LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices



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

Rep: Reputation: 30
Windows file names in Linux console


Hey,

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

Code:
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
sausagejohnson
Member
 
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
mbegovic
Member
 
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
mikshaw
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
bulliver
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: 77
You can also quote it, ie:
cd "Documents and Settings"

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


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 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


All times are GMT -5. The time now is 08:57 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration