in case of a space...
i've encountered this several times already whenever i'm using character-cell mode in Linux. you see, sometimes i just can't avoid naming files with spaces in it, as i do this in GUI mode. now whenever i don't start X, i try to go to a folder or want to open a text file, and i can't get it to open since there names contain spaces.
so aside from renaming these files into something w/out spaces, what else can i do? i'm sure there's a work around for this in Linux. if DOS can do it with ~1 or ~2 whenever there's a space, there's no doubt Linux has a way of doing this too!
If I remember right, you simply put quotes (") around the file or directory name, space included. For example, if your directory is called /usr/my stuff/ and you want to cd into into, do:
cd /usr/"my stuff"
The other thing I use a lot of that is useful is the tab key for long filenames. This is an auto complete thing that prevents typos for me. Like /var/log/reallreallyreallylongcomplicatedfilenamethatIdontw antotypeallin
do /var/log/real<Tab> and if the first few characters are unique, it automatically fills the rest in.
oh, yeah! i am feeling so stupid right now! quotes does do it! one of the most common things in programming - Strings - and i ... oh hell! hahahaha...
you made my day that I could actually be the giver of instead of receiver of help, even if it was simple.
u can also use escape characters, also known as backslash
eg. if ur file is /home/mp3/artist - song.mp3
type /home/mp3/artist\ -\ song.mp3
by putting in abackspace it makes the character after the backslash into a text character and not a command space.
ok,thanks guys. i just suck at this! hehe... mind you i tried placing the ASCII value of a space where a space occurs in a filename. sure enough that didn't work, but i never thought of an escape character nor of a string-literal-like way of doing it. this had me laughing the whole night, that night, when aschueler answered this post. =)