Possibly the dumbest question I would ever expect to ask
I have been using linux for quite some time now, but there is one thing that is REALLY erking me........
I dual boot XP and FC4, That works OK (wish I could just get rid of XP all together). My problem is with the command prompt. I mount the windows directory, usually with: # mount /dev/hda1 /windows Works fine, I can access the folder ok. But, I cannot cd to folders with names containing spaces! If I type ls, they exist..... so I know they are readable to linux. I can do this fine from the desktop (Gnome or KDE) but for some reason not from the command line. I tried using for example: # cd /windows/Documents_and_Settings #cd /windows/Documents%&and%&Settings #cd /windows/Documents&%and&%Settings #cd /windows/Documents%and%settings as well as ALOT of other ascii combos I thought might work. What makes it possible for gnome and KDE to navigate these folders? |
Cancel that question LOL
I figured it out after trying one last passing thought #cd 'Documents and Settings' That did it fine LOL maybe someone else will wonder and and find this helpful |
You can also do like this:
Code:
cd /mnt/C:/My\ Documents/Some\ Folder\ with\ Spaces Note: The use of colours is just for easily understanding the folder names. Otherwise it might have been confusing. |
or, you could use a "\" as a sign to tell it to add the next character, for example:
Code:
$ cd Documents\ and\ Settings |
Thanks Harishankar and tsphan,
I'll set that to memeory, It's good to know... It was driving me batty for a while LOL |
What's with all this pointless typing? Haven't you discovered the awsomeness that is TAB completion?
Type part of the file name then hit TAB and the directory will be typed for you. If there is more than one match then hit TAB again and it will show you what matches what you have so far. Plus, this helps to cutdown on typing mistakes which waste time. Try it out, I prommise that you will use it all the time. In fact, I use it so much that I accidently assume that everything has tab complete and will hit TAB when I'm typing URLs sometimes. |
Even when you use TABbing you need to know about escaping spaces (using '\ ') since there could be two direcories with the space in te same place:
My Documents My Music No amount of tabbing gets you through that one ;) |
Quote:
|
I forgot about tabbing
I did use it for a long time, then I started using DOS again for a while (installing OS's for people) and got used to the DOS restrictions again. It's really annoying to hit the up arrow and NOT have your last command listed again. LOL I'll start using it again now that you reminded me :D although the escape is still very valid and useful info too |
I didn't mean to suggest that knowing the escape character was unimportant---quite the contrary, you gotta know that. I just wanted to point out that TAB rules! :)
|
All times are GMT -5. The time now is 09:14 PM. |