Are there any filename or path length limits on Linux?
From serverfault
ro
-
http://en.wikipedia.org/wiki/Comparison_of_file_systems
See the section called "limits"
From WerkkreW -
And for the sake of saving time (and anchoring it to memory):
ext2, ext3, ext4, zfs: no pathname limits; 255 bytes filename limit.
From Ivan -
Those are file system name lengths. "linux" itself has some too. For instance, from bits/stdio_lim.h:
# define FILENAME_MAX 4096
Ivan : So since the extX filesystems have a lower filename limit than what's defined in the kernel, you wouldn't ever hit that limit, unless it also encompases pathnames, right?jj33 : that's what it looks like to me. There's also PATH_MAX for the path, which is 4096, so it would be hit before the "unlimited" path size on the exts... I'm not sure how the OS resolves its own internal restrictions and those of the FS, never had my arms in that deep. interesting question though.Avery Payne : 4096 characters is a helluva path name. I'm sure it could be raised with a recompile, but honestly, /why would you need pathnames that long?/jj33 : I'm not sure you would need it or not. I view it more as a protection against malicious or negligent programs (I could easily see a script that behaves poorly and begins creating the same dir recursively. Actually, I've made that script, but it was redirecting a web site, not creating dirs...).From jj33
0 comments:
Post a Comment