How long can be files names and folder names in Ubuntu Linux and what characters are allowed in file name and folder name in Ubuntu Linux?
Asked
Active
Viewed 3.0k times
2 Answers
4
I'm not sure what the maximum file name length can be (for ext4), but it's more dependent on the file system, than Linux itself. On FAT32, I think it is 255 characters. You probably don't ever actually need a file name that long.
As for characters allowed, any byte value is allowed on the ext4 file system, except for the NULL byte (and /, as that is the directory separator1). However, you should limit your file names to the UTF-8 character set, for the widest range of compatibility across applications, and devices.
1. As stated in the glibc manual, "any character except the null character is permitted in a file name string," but a / in the file name string separates the name of one file or folder from that of its parent.
Eliah Kagan
- 119,640
dobey
- 41,650