Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 09-23-2004, 01:38 PM   #1
Registered: Sep 2004
Posts: 37

Rep: Reputation: 15
long folder names

hi - i have a question. i am using fedora core 2 on a dual boot system with Windows XP. I successfully installed the NTFS driver and can mount windows onto Linux with no problem. My Windows has 2 partitions, one NTFS (for Win XP) and one FAT32 (to share between Windows and Linux) I have no problem mounting and viewing whats in the drive, but the problem comes when i try the 'cd' or 'ls' command to go to any folder that has two or more words in it, i.e:

i have a folder in my fat32 partition,
to windows it is:

D:\Linux Files

However, when I try to cd or ls to it from Fedora:

cd /mnt/windows/files/Linux Files

I get the following error:
bash: cd: Linux: No such file or directory

meaning it's only reading the first word and doesn't see anything beyond the space. I even tried

cd LinuxF~1

But that didn't work either. Same error. How can I resolve this?? TIA
Old 09-23-2004, 01:41 PM   #2
Registered: Sep 2004
Posts: 37

Original Poster
Rep: Reputation: 15
stupid me found the answer to this simple question 2 seconds after i spent all that time posting it. if anyone has the same problem as i do (likely not since it was simple), just do the cmd


and it will show you the long folder names as

Linux\ Files and you can cd to that just fine.
Old 09-23-2004, 01:56 PM   #3
Registered: Aug 2003
Location: Cleveland, OH
Distribution: Ubuntu 6.06
Posts: 66

Rep: Reputation: 15
The back-slash (\) character is an escape character--meaning anything after it is interpreted as a symbol and not an operator or input separator or whatnot. So if you wanted to name a file ***IMPORTANT*** you could do a $>mv file \*\*\*IMPORTANT\*\*\* and that'd work. Without the \ in Linux\ Files, commands are looking for BOTH the directory /mnt/windows/files/Linux and the directory Files in whatever directory you currently are in. Another way you could accomplish what you're trying is to type $>cd /mnt/windows/files/"Linux Files" -- everything in the quotes is considered one "word" or file or directory. This gets nice as in when you're manually renaming long file names:

mv Artist\ With\ Spaces\ -\ CD\ Title\ -\ Track\ -\ Wrong\ Song\ Title.mp3 Artist\ With\ Spaces\ -\ CD\ Title\ -\ Track\ -\ Correct\ Song\ Title.mp3

mv "Artist With Spaces - CD Title - Track - Wrong Song Title.mp3" "Artist With Spaces - CD Title - Track - Correct Song Title.mp3"
It's just easier to read.


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
Fat32 Long file names cppkid Programming 1 07-29-2005 04:01 AM
shortcut for typing long names karan101 Linux - Software 3 01-12-2005 02:54 PM
long file names; fatso32 itzfritz Linux - General 7 11-14-2004 06:56 PM
dosfs and long file names Ipolit Slackware 3 12-08-2003 01:36 PM
Long File Names Pwcca Linux - General 1 03-05-2003 05:15 AM

All times are GMT -5. The time now is 11:43 AM.

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