Windows NTFS および Unix でのファイル名の 255 文字の制限は、パス全体ですか、それともパスの一部ですか?
つまり、c:\part1\part2 には part1 だけがあり、part2 は 255 未満である必要があります。それとも、C:\ + part1 + part2 ですか?
Unix のルールは?
Windows NTFS および Unix でのファイル名の 255 文字の制限は、パス全体ですか、それともパスの一部ですか?
つまり、c:\part1\part2 には part1 だけがあり、part2 は 255 未満である必要があります。それとも、C:\ + part1 + part2 ですか?
Unix のルールは?
Windowsでは、part 1とpart2の両方が255以下であり、c:\ part1\part2全体が260以下である必要があります。WinNTカーネル(Windows 2000、XP以降)でファイル名とパスを長くする方法がありますが、これには、そのようなファイルにアクセスするアプリケーションがそのようなファイル名を明示的にサポートする必要があるため、ほとんどの場合、255/260の制限をハードリミット。
In addition to the answers above, you also have to account for the filesystem being used (ext2, etc.). There's no standard answer for Unix. Linux is generally 255 per component and either 4096 for the full path, or unlimited for the path. Other Unix variants use different limits. OSX with HFS+ is 255 filename and either 1024 or unlimited path (I can't find a definitive answer). Unless you're positive you only have to worry about Linux, you'll probably want to keep the overall path low just to be sure. It's not a bad idea to limit the entire path to 255 if possible. You may also need to consider that filesystems can be network-mounted, and NFS, SMB, etc. have their own limits.
The short answer for Unix is that there is no short answer nor is there a standard, and both the operating system and the underlying filesystem impose restrictions.