answer is: limit is usually 255 chars (for those who are too lazy to click this link)
–
rahmanisbackSep 17 '12 at 15:04

6

Your answer should contain at least a summary of the relevant information in the link provided. Not just a link.
–
zrajmSep 15 '13 at 18:18

@rahmanisback that's right for filename limits, while path limits are usually defined by the OS, not FS (except for some strange FSes like iso or ntfs), and, on linux, are 4K
–
nonchipJun 27 '14 at 14:13

@nonchip thanks for clarification although the question was about filename length not paths.
–
rahmanisbackJun 28 '14 at 14:45

Sorry, but I'am new here an can't even comment, save vote. The previous answer (by sfp) should be upped, as it answers the question completely, while the others are partially off. Again, sorry for going besides the rules, but I can't be quiet when the best answer is at the bottom.
–
David BalažicJan 3 '12 at 23:56

Just pointing out: bytes != chars, especially if you use UTF-8. See here.
–
KrisJun 5 at 20:36

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?
–
IvanMay 18 '09 at 18:33

1

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.
–
jj33May 18 '09 at 19:53

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?/
–
Avery PayneMay 18 '09 at 23:52

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...).
–
jj33May 19 '09 at 12:12

@AveryPayne To add tags to files so they could be searched using a simple locate.
–
Hubert KarioJun 18 '12 at 20:33