Can't open a two word directory.
I have the following directory under my root directory:
My Documents It's two words and I can't CD to it. Is there anyway to use the ls -la command to CD to this directory? Thanks |
ls is used for list the content within current directory, i dont know how to use ls -al for cd to the directory. however
cd, type the first word of the directory "M" and use the tap key or from ls -al out put copy the name of the directory and paste it OR rename the "My Documents" directory as a one word name and then try to cd to that directory |
If you don't want to rename it,
cd My\ Documents should do the trick. |
From a terminal you type this:
Code:
cd /home/{myhomedir}/My\ Documents jdk |
Code:
mkdir "my documents" |
Yep, alternatives include
1. escape the space '\' 2. use double quotes 3. use single quotes 4. rename to something sane eg change space to underscore (my favourite) IME, file/dir names native to *nix don't have spaces in them, even though its legal to do so. Most *nix tools use space to separate args on there cmd line, which is prob why we don't have spaces in a file/dir name |
try cd my?documents
Works here nicely, :) Sasha |
Quote:
to type the whole thing out! 'cd my\ d' will allow for tab expansion, saving 7 key-strokes (if there's no other dirs that start with my\ d, that is) ;D Cheers, Tink |
Not lazy enough?? :confused: Sheesh!
Well then make sure it's the only folder in the working directory, and type: cd * I can't make it any lazier than that :D PS - where's the OP? I wonder if any of these options is working.. Sasha |
All times are GMT -5. The time now is 12:38 AM. |