LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-12-2003, 05:41 PM   #1
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Rep: Reputation: 15
accessing files & directories - a really simple question


Here's a question that probably everybody but me knows the answer to.

I have a file server running on Win 2k, the files on which, as of a few hours ago, I am successfully able to access. The small problem I'm having is, from the command line, accessing those files & directories which are more than a single word or that contain spaces. Is there a substitute character in Linux that means "space bar" ?

For example, if I'm trying to navigate to the directory "Vince Guaraldi Trio" located on /mnt/mediaserver, I've tried:

$ cd /mnt/mediaserver/Vince Guaraldi Trio

Then, as you know, I get the error message:

bash: cd: Vince: No such file or directory

I know I can successfully get there by:

$cd /mnt/mediaserver/Vince*

But what if I had 2 directories, one called "Vince Guaraldi Trio" and one called "Vince Vaughn Sings The Blues", how would I cd to "Vince Vaughn Sings The Blues" ?

Of course I can do all this stuff from the gui, but I'm trying to learn to do as much in the terminal as I possibly can.

Thanks.
 
Old 10-12-2003, 05:47 PM   #2
FreakboY
Member
 
Registered: Jun 2002
Location: TX, USA
Distribution: Slackware 13 64bits
Posts: 374

Rep: Reputation: 31
cd /mnt/mediaserver/Vince\Guaraldi\Trio

try that!
 
Old 10-12-2003, 06:06 PM   #3
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks for the response...but here's what I get when I do that:

[hildog@localhost hildog]$ cd /mnt/mediaserver/Vince\Guaraldi\Trio
bash: cd: /mnt/mediaserver/VinceGuaraldiTrio: No such file or directory

It looks like it doesn't think that the \ is supposed to be a space ? Is that right ?
 
Old 10-12-2003, 06:10 PM   #4
FreakboY
Member
 
Registered: Jun 2002
Location: TX, USA
Distribution: Slackware 13 64bits
Posts: 374

Rep: Reputation: 31
cd /mnt/mediaserver/Vince \Guaraldi \Trio
cd /mnt/mediaserver/Vince\ Guaraldi\ Trio

it has to work don't remember....
but i know is something like that...
let me get to my linux box!!!
 
Old 10-12-2003, 06:13 PM   #5
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
It's the 2nd one. thanks.
 
Old 10-12-2003, 06:14 PM   #6
FreakboY
Member
 
Registered: Jun 2002
Location: TX, USA
Distribution: Slackware 13 64bits
Posts: 374

Rep: Reputation: 31
hahaha, great!!
 
Old 10-12-2003, 06:17 PM   #7
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
one way to find out the exact format is to type out the name of the directory/file as far as you can and then press TAB to expand it.
If a file name contains spaces, it's
part1\ part2\ part3\ ...
(a \ followed by a space instead of just a space)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C and reading files & directories problem climbingmerlin Programming 4 10-12-2005 02:25 PM
set file permissions for 100 directories & its files cevjr Linux - Security 6 01-06-2005 10:23 AM
KDM && GDM Simple Question shaggz Linux - General 3 02-14-2004 05:37 AM
Need help with directories & files GoboFraggle Programming 4 04-09-2003 06:04 AM
Question about accessing shared directories zikfreak Linux - Newbie 0 08-18-2001 04:19 PM


All times are GMT -5. The time now is 04:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration