SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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.
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.
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. ("\ ")