 |
 |
Simple directory problem
|
 |
|
 |
|
Registered User
Join Date: Nov 2002
Status:
Offline
|
|
Hello, im learning how to use Unix, at uni and about 2 weeks behind due to jumbled registration process,
im trying to self teach myself Unix to catch up and can't access files or folders using terminal at home that have a space in the middle of the names. eg,
Back up (folder)
it will tell me that there are too many arguments.
Do i need to substitued the space with somethign else. Because if i change the name of the Back up (folder) to Back_up i can then access it.
I don't want to change everyfile and folder with underscors, so can somebody who knows more about UNIX then i do, help me out.

|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
Originally posted by kOnshii:
im trying to self teach myself Unix to catch up and can't access files or folders using terminal at home that have a space in the middle of the names. eg,
Back up (folder)
Yo.
You need to escape the whitespace character so the Terminal doesn't get confused:
[ekm218-093-r:~] aorth% cd Phone\ Numbers/
You use the "\" to escape the space character... all should work well then. 
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jun 2002
Location: UK
Status:
Offline
|
|
Originally posted by [APi]TheMan:
Yo.
You need to escape the whitespace character so the Terminal doesn't get confused:
[ekm218-093-r:~] aorth% cd Phone\ Numbers/
You use the "\" to escape the space character... all should work well then.
or...
cd "Phone Numebrs"
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Sep 2000
Location: The dark side of the moon
Status:
Offline
|
|
Coincidentally, you could also rename "Back up" to "Backup", which would be the correct spelling.
edit:
You can also start typing the name of the file/folder you wish to access and then press [TAB], this should autocomplete the name for you or show you a list of possible matches...
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Nov 2002
Status:
Offline
|
|
thank you all, that have been really helpful,
for some stupid reason, the book that i use to study in, didn't give me these alternatives, only said, "to avoid using spaces, try replacing them with underscores, thankyou very much
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|