How does the length of the file name affect the remaining disk space?

How does the length of the file name affect the remaining disk space?

I understand that it depends on the file system. In particular, I am thinking of a series of EXT file systems. I don’t quite understand how inodes affect disk space and how the file name is stored. It is difficult to get relevant search results on this subject. That is why I ask here. On linux, the maximum file name length is usually 255 or 256 characters. When a file system is created, is this amount "reserved" for each file name? In other words, disk storage does not affect the actual file name, since the maximum is already in use? Or is it harder than that?

Suppose I have a file named "joe.txt" and rename it to "joe2.txt". After that, the amount of free disk space decreased? What about longer names like "joe_version.txt" or "joe_original_version_with_bug_that_Jim_solved.txt"? I am worried about thresholds of 8, 16, 32, 64, etc. I will store millions of images. I never bothered to worry about such a problem, so I'm not quite sure how this works.

Although EXT is the only file system I use, a discussion of FAT and others might be useful for someone else who has a similar question.

+3
source share
2

Linux (, , Unix) inode , ( , ) . , NAME_MAX. , Linux NAME_MAX 255.

, , , , NAME_MAX . , inode , ext2/3/4 (4 , - ) . 4 ( ), (filename, inode) 4 ( , ), 4 .. (ext2/3 -, ext4 ).

+1

FAT16 .

FAT32 ; , , , . , , , , , .

, UNIX.

0

Source: https://habr.com/ru/post/1766127/


All Articles