FedoraThis forum is for the discussion of the Fedora Project.
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.
Fresh install of FC8 no more than an hour ago, I have gotten mplayer set up to play just about anything, except it will not play files with a space (%20) in the file name. I had discovered this attempting to play files off of a network drive, which failed, but all online media works just fine. I had also narrowed it down by moving them locally and taking any special characters out, and voila, it works.
Question is, is there a way to tell mplayer to play files with special characters, namely with spaces?
Distribution: Slackware 11, Solaris 10, Solaris 9, Sourcemage 0.9.6
I think you can play the files by launching mplayer from the command line, and using tab completion for the filenames. When you do that, spaces are automagically escaped.
To tab-complete a filename, enter the first few letters (with proper capitalization) of the filname, then press tab. The complete filename should appear. If you get a beep or no response, add more letters and check whether you've typed in the first few ones correctly.
Spaces in file names are normally a "Bad Thing" in Unices; is there some compelling reason why they are needed here?
BTW, it's almost trivial to whip up a 3-liner to translate them all to underscores. It might be better to start using normal Linux/Unix best practice than fixing these "bugs". (I say "bugs" because I'm sure that there are die-hards who would call this a feature -- the program is detecting defective file names for you. )
Linux is not Unix
Linux is fortunately about choice, the choice to have spaces in your filenames if you want. For me all new files and folders I create do not have spaces, but I am not going to go through all of my files dating back to the early 90's and rename them all because I have switched to Linux. Being flexible is what is winning Linux ground. Being rigid and you may as well use SCO-unix.
This is a bug as it breaks previous behavior, nuff said.
I am not sure how to explain my view both clearly & politely, I here's trying:
Of course Linux is not UNIX® (uppercase, trademarked, specific), but it is a Unix (lowercase, not trademarked, generic), as I meant the phrase "in Unices" to imply. Sorry for not being clearer.
I am not sure when M$ started allowing spaces in filenames, perhaps w/ Win95. The exact time is not so important, as that this was a change that makes/made older software written to an earlier standard seem broken. Some would accuse M$ of doing this deliberately.
I don't see eschewing spaces as having anything to do w/ rigidity; but, rather, technically logical behavior. It just happens that this coincides w/ nearly 40 years of *nix practices.
When you decided not to create any new files or directories w/ spaces in their names, it sounds to me as if you acknowledged this as a better way. Given that Linux allows you to write recursive scripts, you can, if you want, remove the spaces from your existing file names easily & automatically. It is not the Herculean task that in might be in "Winders".
FWIW, if you deal w/ music file names, you may find that this is an on-going issue. I have written a script that "fixes" such file names & I run it periodically.
I do realise that no spaces in filenames is better practice. But humans tend to like spaces in filenames, as it makes it easier to read. Same reason we have domain names instead of everyone remembering ips'.
Flexibility is the key to Linux's current success and its future success, if people want to have spaces in filenames, so be it.
FWIW, I just used the Konqueror "Archive Web Page" Tool(s). It chose a title for the .war that included lots of spaces. I also did a "Save As" (still in Konqueror) on the same page, this time the title had lots of hyphens in it -- as they say in this neck of the woods, go figure.
Totally OT: In Konqueror I just ran search & replace on the text in the dialog box in which I am writing this (& it worked). Cool, I wonder if FF or Opera can do that.