LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-02-2005, 05:49 PM   #1
brett90
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Rep: Reputation: 0
Problems with Fat long file names in Bash


Hi people
Im having some problems with the way the shell is dealing with directories containing spaces in there names stored on my windows drives. For example when im logged in as a normal user the directory: network tunez appears as network\ tunez/ and other strange combinations. However if im logged in as root, the directory names appear as they should but do not allow me to change to them?.
This is causing me alot of bother with mplayer for example where it cannot locate mp3's using playlists, even with a playlist that rythumbox & other xwindows players have no problem using and locating the files from.

do i need to add anything to /etc/fstab to resolve this?

Thanks in advance
Brett
 
Old 06-02-2005, 05:51 PM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
They will appear in that "cryptic" way because a space is represented with "\ " combination on console, it's normal. The last / indicates it's a directory.
I don't know how it appears with root, give some examples so we can spot the problem.

Last edited by gbonvehi; 06-02-2005 at 05:56 PM.
 
Old 06-02-2005, 06:03 PM   #3
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 30
The backslash indicates that it's a broken character. It's used extensively in scripting languages, including just about every programming language in use today.

What it means is that a specified macro character is following the break, and that the two characters should be treated as one with a special meaning. "\ " is a space. There's dozens that I know of, and probably a few I don't know, but the most common are "\n" for new line feed, "\r" for carriage return, "\b" for break, "\\" for a backslash, and so forth. You can also break any punctuation that's being used to indicate the start of your string. So a string variable 'I\'m really going crazy, here!' will be read as I'm really going crazy, here!.

In BASH (and other shells), a space means you're separating arguments. If you type ls network tunez, you'll get two messages. One will say that it couldn't find the directory "network". The other will say that it couldn't find the directory "tunez". You *need* to break the space so that it's treated as a space and not a separator. The only other way to get it working is to type ls "network tunez".

Incidentally, that's not a problem that's unique to Linux. You don't see it in Windows because you're using the GUI. You may have noticed that any GUI file browsers in Linux also don't show you the broken space. The command line in Windows, however, will require quotation marks. (in Windows, you can't use the backslash as a break character, because it's used as a directory separator. You can also see it when you use the CLI shell on Mac OS/X.
 
Old 06-03-2005, 04:23 AM   #4
brett90
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for the reply.... im still however having problems with mplayer addressing files stored in these directories.. despite copy & pasting this path into a playlist file
 
Old 06-03-2005, 11:59 AM   #5
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Can you give us some more information?
What are you copying into MPlayer (the exact string) and where?
Also which is the name of the directory, and, can you access it outside mplayer?
 
Old 06-03-2005, 12:15 PM   #6
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 30
He did say that other players work, so I would assume that he can access it outside of mplayer.

Knowing exactly what string he's putting into mplayer could be important. If he isn't breaking the space, for example. I believe the directory's name is "network tunez" as his original post said. If not, it's probably close enough.

I don't know mplayer specifically, but I am kind of wondering what version of the software he's using. I was under the impression, after seeing the website (http://www.mplayerhq.hu/homepage/index.html), that mplayer development has been put on hold until the EU's copyright laws are reexamined. I could be wrong, however. I usually stick to xine for movies, and JuK for MP3/OGG. FWIW, JuK has no problem at all with spaces in file names, but it does require that the space be broken. ("\ ")
 
  


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
Fat32 Long file names cppkid Programming 1 07-29-2005 04:01 AM
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
I can't read long file names on my CDROM sutcli Linux - Newbie 3 11-02-2003 02:42 PM
Long File Names Pwcca Linux - General 1 03-05-2003 05:15 AM


All times are GMT -5. The time now is 06:57 AM.

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