On Sun, 15 Jul 2001 21:39:37 -0230, Trevor staggered into the Black Sun
and said:
Quote:>I recently mounted my windows 2000 ntfs partition in linux. Some of my
>directories/folders on this partitions have spaces in them (ex: My
>Documents)... I've tried everything to get into these directories by
>using the 'cd' command, but nothing has worked... I even tried 'cd
>My%20Documents", but that doesn't even work...
>Can anyone help; me on this....???? Is there a way to denote
>ASCII character (ex: ASC(32) for the spacebar or something)....
From the shell:
cd "My directory with spaces in it"
cd 'My directory with spaces in it'
cd My\ directory\ with\ spaces\ in\ it
That "%20" thing is URLencoding, which is *NOT* used internally, since
Unix shells had to deal with files and directories with spaces in the
names long before the Net as such existed. Konqueror uses this encoding
in the location bar, but translates it to spaces and puts the whole
thing in quotes, or escapes the spaces using the \ .
Typically, the \ is used to say "The next character is usually a special
character, but now I want to use its literal character code." Thus we
can have a file named
"'{).txt
and get to it by typing
emacs \"\'\{\).txt
from the shell.
Better yet, use C-style naming conventions for all the files you have
control over. The only characters you use should be 0-9A-Za-z_-. Makes
it much easier when working in a cross-platform environment, since in
MacOS < X, "/" is legal in filenames and ":" isn't, in Windows, "\",
"/", "{}", and a few others are not legal, and in Unix, "/" is not legal
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / That which does not kill us
http://www.brainbench.com / makes us stranger.
-----------------------------/ --Trevor Goodchild, "AEon Flux"