How to remove file (which has white space in name) from Unix?
|
feedback
|
migrated from stackoverflow.com Apr 5 '11 at 9:22
This question came from our site for professional and enthusiast programmers.
|
Use quotes to surround the file name:
Update: use the quotes to enclose the whole path to the file:
The quotes tell the shell command to interpret the quoted string as one argument (so you can use this with most shell commands). | |||||||
feedback
|
|
If you do it manually in your shell (and the filename is more or less unique, i.e. it differs from other filenames not in the positions where whitespaces are) you can use TAB completion. Just type a few letters of the beginning of the filename and hit TAB. Repeat this until the filename is complete. rm fi(press TAB) | |||
|
feedback
|
|
Have you tried:
Edit: You might also consider changing your paths to not have spaces, using, perhaps, this script. | |||||
feedback
|