LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-09-2006, 08:03 AM   #1
benben_shen
LQ Newbie
 
Registered: Nov 2005
Location: Singapore
Distribution: Ubuntu / Debian
Posts: 26

Rep: Reputation: 15
How To Access Folders with a Space in the Name


Hi Guys:

I have this problem, I have a portable disk which I created folders under windows, names having space in side, for example a folder called "My Music",

How do I access them from Linux command line? when I type "CD My Music", it will just say "My is not a valid name"

Please help me

Thanks a lot.
 
Old 04-09-2006, 08:08 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337

Rep: Reputation: 65
Use tab. It will complete the path for you automatically. You could alternatively use back slashes:

cd My\ Music\

or something like that. I always use tab though
 
Old 04-09-2006, 08:29 AM   #3
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Or you can use " " to surround the name:
Code:
cd "My Music"
As with Mega Man, I prefer Tab completion though.

--Ian
 
Old 04-09-2006, 08:33 AM   #4
coolb
Member
 
Registered: Apr 2006
Location: Cape Town, South Africa
Distribution: Gentoo 2006.1(2.6.17-gentoo-r7)
Posts: 222

Rep: Reputation: 30
Quote:
Originally Posted by benben_shen
Hi Guys:

I have this problem, I have a portable disk which I created folders under windows, names having space in side, for example a folder called "My Music",

How do I access them from Linux command line? when I type "CD My Music", it will just say "My is not a valid name"

Please help me

Thanks a lot.
if you shell supports it just #cd M <-- tab it :-)
 
Old 04-10-2006, 12:28 AM   #5
benben_shen
LQ Newbie
 
Registered: Nov 2005
Location: Singapore
Distribution: Ubuntu / Debian
Posts: 26

Original Poster
Rep: Reputation: 15
all right guys, thanks a lot for your opinion. love you guys, everytime I have some problems, sure got people help me here.
 
Old 04-10-2006, 02:35 AM   #6
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Quote:
Originally Posted by Mega Man X
cd My\ Music\

or something like that. I always use tab though
cd My\ Music/
 
Old 04-10-2006, 03:17 PM   #7
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337

Rep: Reputation: 65
thanks Alien_Hominid. I knew I was doing something wrong. The Tab key made me lazy
 
  


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
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 07:14 AM
Changing Access To Folders John_Emad Linux - Security 9 01-03-2005 02:52 AM
Not enough privileges to access certain folders joeman3429 Fedora 1 07-20-2004 07:46 AM
partitions: space used/free and folders inside joshfields Linux - Newbie 2 05-18-2004 08:21 PM
no access for other folders dineshb Linux - General 2 03-18-2004 07:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:10 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration