I just tried to move a directory containing music files with thunar 4.10
It complained that a file name was invalid.
It turned out that one file name (song title) contained a question mark.
I suspected that this was a problem, removed the question mark and could indeed copy the file.
Adding the "?" back in was not possible. I also tried it with rename
on the command line but that didn't work either. (not sure what thunar uses under the hood, so this test might be moot)
Now if a question mark makes the file name invalid, how could this file be created in the first place? I created the files with SoundJuicer
from a newly obtained CD. I was able to play the file (with "?" in the name) in various players.
What's going on here? Can I have the "?" in the name or not? Why is the file manager unable to handle such files while other applications seem to be ok with it?
Update: Next song has a ":" in it. Same problem as with the "?".
These are not invalid characters to Unix; typically only the NUL character and the / character are invalid filenames (the / being the directory separator).
This was what my intuition told me as well, because I never had any issues with file names in Linux and could throw pretty much everything sensible at it and it worked ok. This is what motivated the question here. I never encountered invalid file names before.
Were you trying to move the files to a USB stick? If so, is that stick formatted as FAT32 or as a native Linux filesystem?
The target is indeed a USB stick that I bought today. I opened gparted
and it is formatted as FAT32.
I'm not exactly sure but that's a Windows thing right? And Windows has a bunch of characters that it doesn't support, apaprently including ?
and :
. Am I right?
/
character are invalid filenames (the/
being the directory separator). Now in the command line you may need to quote the?
(and ` ` and*
and similar) - e.g.touch 'test?'
- to ensure the shell doesn't try to interpret them, but that's a different problem.?
or:
in the name. I also assume, as roaima already pointed out, that rather the filesystem does not support the special characters.