Are there any invalid characters for an ext3 filename?

Solution 1:

Just those two.

From the wikipedia page on ext3:

Allowed characters in filenames - All bytes except NULL and '/'

Solution 2:

/ seems to be allowed, at least on ext3 (supposedly in all, ext, ext2 & ext3 at least, likely also ext4) - just try this:

f='test/file'; echo "Test: '${f}'"
for c in touch ll rm ;do
eval "${c} '${f}'"
done

That will create "test/file", surprised me too... It will create it, show it with ls command and finally remove it with rm

You can type it on one line in bash:

$ f='test/file';for c in touch ll rm ;do eval "${c} '${f}'";done

So / seems to be (bizerrely) allowed in filenames - probably many tools can get confused with such though...