![]() | ![]() | ![]() | ![]() |
|
faq search add article cool-stuff how-to main tips |
Posted by Jason on Wednesday January 09, @03:55PMfrom the back-slash-space dept. If you have a directory name which contains spaces, you can use the cd (change directory) command to change to those directories. You can also manipulate files when their name contains spaces. All you have to do to work with these files and directories is use a \{space} to represent the actual space in the name. Example: If you keep all your mp3 files by the name of the Artist and the name of the Album, your directory structure might look like this: /mp3/ If you wanted to cd to the New York directory and change the name track1.mp3 to the name 1 - Romeo had Juliet.mp3 you would have to use the the \{space} like so: [Changing Directories] # cd /mp3/Lou\ Reed/New\ York [Renaming the File] # mv track1.mp3 1\ -\ Romeo\ had\ Juliet.mp3 [Using wild cards] You can also use wild cards * to simplify changing directories. If you have a directory like so: /mp3/Grateful Dead/What a long strange trip its been/ You may not want to do all the \{space} typing. In this case here is what I would do: # cd /mp3/Grat*/What* As a general rule I always recommend reading the man pages for all unix commands. However, the man page for cd is quite slim and has no reference to working with spaces. man cd man mv man pwd < | >
|
|
||||||||||||||||||
|
||||||||||||||||||||
| "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate |
|
| All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann. |