I named a number of files with spaces in them, and I want to replace the space with "_". However, every time I write a command in the shell with the file name (eg "Spring 2011"), the shell doesn't recognize the file or directory. What can I do about this? Is there any way to use the unicode character for a space?
|
feedback
|
migrated from stackoverflow.com Jun 12 '11 at 3:35
This question came from our site for professional and enthusiast programmers.
|
Escape the space, e.g. If you've got
| |||||||||||||
feedback
|
|
If your machine has the rename command, then this will change all spaces to underscores in all files/dirs in the current working directory:
| |||
|
feedback
|
|
| |||
|
feedback
|
|
If you don't have
| |||
|
feedback
|
|
I had a bunch of files with ".jpg;1" as the suffix. I fixed it by:
| ||||
|
feedback
|
