[TriLUG] question on maximum path length or file name
Alan Porter
porter at trilug.org
Wed Jan 23 16:45:41 EST 2008
> I'm trying to figure out how long a filename can be or how deeply a file
> can be nested in terms of the length of the path to get to it. A stat -f
> / on my system tells me that Namelen equals 255. I assume that this
> means a file cannot have a length of more that 255 characters but does
> that include the path to get to that file? I haven't found anything of
> help so far with google.
On an ext2/ext3 filesystem, there is a limitation of the length of a
single filename within a directory (since the directory is really just a
table of names and inodes).
But there is no limitation on the entire path of the file (like the limit
in DOS), since that information is really only stored in a hop-by-hop
manner in the directories above the file.
Individual programs might have a limit on the number of characters in a
file's complete path, but that is not a limitation of the filesystem
itself.
Hope this helps.
Alan
.
More information about the TriLUG
mailing list