February 27, 200818 yr In my Movies directory I have been naming them all with spaces in the titles. I saw a post here that said to NEVER use spaces in your filenames. Is there a reason for this and is there a utility that can be used to rename them. It doesn't matter to me if they have spaces or not. I am just curious as to why spaces should not be used.
February 27, 200818 yr As long as the programs and tools you use can handle the spaces, you will be fine. In UNIX (or Linux) there are only two characters that are not permitted in file or directory names. They are the forward slash "/" and the null character (hex value of 0x00) All other characters are permitted. Some characters may make it difficult to use commands on the files or directories without quoting or escaping their meaning to the shell, but they are still allowed. In the SAMBA implementation (and in MS-Windows) there may be other characters that cannot exist. Probably ? [ ] / \ = + < > : ; " , * | and ^ are not allowed. Note that most of them (all but the forward slash) are legal on your unRaid server running Linux. In Linux you can "escape" the slash, by preceding it with a backslash, or quote the entire string. To use a backslash itself, use two. The first escapes the special meaning of the second. Joe L.
February 27, 200818 yr As long as the programs and tools you use can handle the spaces, you will be fine. Some don't, particularly when you are mixing Windows shares to a Linux box. And it has the potential to complicate your life. Why risk it? Just use the underscore instead of spaces.... it reads and looks the same and effectively prevents problems.
February 27, 200818 yr As long as the programs and tools you use can handle the spaces, you will be fine. Some don't, particularly when you are mixing Windows shares to a Linux box. And it has the potential to complicate your life. Why risk it? Just use the underscore instead of spaces.... it reads and looks the same and effectively prevents problems. Good advice... Best if you can use characters both can deal with. I do remember, a very long time ago, an SMB implementation on a very early UNIX that created a file name with a forward slash within it. It really confused the UNIX tools. We ended up needing to use a hex editor on the raw disk to fix it.... ouch. You should be fine with the spaces within your movie names. However, as you can see from this partial file listing of my "Movies" share, I use a combination of underscores and dashes to make the movie titles readable on my media players and file listings. As BubbaQ said, why complicate your life. root@Tower:/mnt/user/Movies# ls -1 ST* STARTREK.ISO* STARTREK_3.ISO* STAR_TREK_4.ISO* STAR_WARS-1-THE_PHANTOM_MENACE.ISO* STAR_WARS-2-ATTACK_OF_THE_CLONES.ISO* STAR_WARS-3-REVENGE_OF_THE_SITH.ISO* STAR_WARS-4-A_NEW_HOPE.ISO* STAR_WARS-5-THE_EMPIRE_STRIKES_BACK.ISO* STAR_WARS-6-RETURN_OF_THE_JEDI.ISO* STORM_OF_THE_CENTURY.ISO* STRIPES.ISO* Joe L.
February 27, 200818 yr FWIW I always use spaces. In the linux 'bash' command shell, you can 'escape' a space using the backslash character, e.g., ls /mnt/user/Video/Hawaii\ 2007 will list the contents of the "Hawaii 2007" directory.
February 27, 200818 yr Me too, but I don't use the Unix command line very much. Midnight commander seems to handle them fine.
Archived
This topic is now archived and is closed to further replies.