SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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
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?
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. ("\ ")
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.