Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-29-2004, 11:40 PM   #1
Registered: Nov 2003
Location: Vancouver, Canada
Distribution: Currently FC3
Posts: 342

Rep: Reputation: 30
Windows file names in Linux console


Is there some way of cd-ing into Win directories that contain spaces from the terminal? As in:

m@S01060080c6f99b74 /mnt/windows $ cd Documents and Settings
This doesn't work because of the white space in the directory name, of course.
Old 04-30-2004, 12:06 AM   #2
Registered: Mar 2004
Location: Canberra, Australia
Distribution: Fedora Core 9
Posts: 242

Rep: Reputation: 30
Try using a slash for the blank:

cd Documents\ and\ Settings
Old 04-30-2004, 12:10 AM   #3
Registered: Nov 2003
Location: Vancouver, Canada
Distribution: Currently FC3
Posts: 342

Original Poster
Rep: Reputation: 30
Sweet, man. Thanks a lot.
Old 04-30-2004, 12:14 AM   #4
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Just to clarify, you'd use the backslash AND the space (backslash escapes the space so it is essentially read as a character).
You can also just type the first couple of letters and then hit the Tab key to fill in the rest automatically.
for example:
"cd Doc<Tab>" would become "cd Documents\ and\ Settings" if this were the only directory which begins with "Doc". If it's the only directory which begins with a D, then all you'd need to type is "cd D<Tab>".
Old 04-30-2004, 02:09 AM   #5
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
You can also quote it, ie:
cd "Documents and Settings"

..always more than one way to do the same thing


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting file names in a directory using C on linux. rajsun Programming 4 06-10-2005 01:47 AM
SSL Install not going well. Linux server, Apache directions? File names not matching. maineweb Linux - Newbie 1 11-18-2004 10:18 AM
my linux console don't print color in c file ngan_yine Programming 6 10-18-2004 04:31 AM
view long file names from windows in linux wildcat22 Linux - General 4 09-03-2004 05:14 PM
Windows director/file names with spaces. How to access them? correro Linux - General 3 03-10-2003 07:58 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:21 PM.

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