Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Simple directory problem

Simple directory problem
Thread Tools
Registered User
Join Date: Nov 2002
Status: Offline
Reply With Quote
Mar 8, 2003, 10:11 PM
 
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
Reply With Quote
Mar 9, 2003, 12:16 AM
 
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
Reply With Quote
Mar 9, 2003, 05:04 AM
 
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
Reply With Quote
Mar 9, 2003, 06:39 AM
 
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...
     
kOnshii  (op)
Registered User
Join Date: Nov 2002
Status: Offline
Reply With Quote
Mar 9, 2003, 05:44 PM
 
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
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:42 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2