I was under the impression that the only character not allowed in file names was
/, but I don't seem to be able to create a file whose name contains characters such as
> either. For instance,
$ echo "*" > * $ touch "*" > touch: setting times of `*': No such file or directory
I'm writing a shell script that requires the user to type a file name and I would like to make sure the name doesn't have any invalid characters. Is there a list somewhere?
I didn't realise I was doing this in a FAT32 filesystem (USB stick), which does not allow `*' and other characters in file names. No wonder it didn't work. Sorry, my bad!!