Google Answers Logo
View Question
 
Q: how to change directory or access filenames with spaces in UNIX? ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: how to change directory or access filenames with spaces in UNIX?
Category: Computers > Operating Systems
Asked by: astrokoala-ga
List Price: $2.00
Posted: 24 Nov 2003 11:40 PST
Expires: 24 Dec 2003 11:40 PST
Question ID: 280103
How do I change directory to a directory named for example:"Labview data" in unix?

I thought it was cd Labview_data but I suppose that literally means
you have a directory named "Labview_data"...

thanks!
Answer  
Subject: Re: how to change directory or access filenames with spaces in UNIX?
Answered By: endo-ga on 24 Nov 2003 11:48 PST
Rated:5 out of 5 stars
 
Hi,

I assume it tells you "too many arguments" with the space.

Try:
cd Labview*

The * means that Unix will autocomplete the directory.

This seems to work, here is a small screenshot:
http://membres.lycos.fr/dbky/endo/labview.jpg

I hope this answers your question, if you need any more help please do
not hesitate to ask.

Thank you for using Google Answers.

Regards,
endo

Request for Answer Clarification by astrokoala-ga on 24 Nov 2003 11:53 PST
I think it will work.  But what if I have "Labview data" and "labview
data2" as two separate directories?

thanks!

Clarification of Answer by endo-ga on 24 Nov 2003 12:16 PST
Hi,

Then you need to "espace" the space character and type the whole directory name.

e.g.:
cd labview\ data2

If you need any more help please do not hesitate to ask.

Thanks.
endo

Clarification of Answer by endo-ga on 24 Nov 2003 12:17 PST
Sorry I meant "escape the space character with a backslash", instead
of what is currently in quotes.

Thanks.
endo

Clarification of Answer by endo-ga on 24 Nov 2003 12:38 PST
Using quotes around the directory works as well.
e.g. cd "labview data"

Thanks.
endo
astrokoala-ga rated this answer:5 out of 5 stars
Great! thanks!!

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy