Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using a ext3 or ext4 file system, assuming that the files have similar checksums, would the following files:


Take up a different amount of space on the HD? I have many (10 to 100's of thousands) of these files so a difference, however small, would be worth knowing about.

share|improve this question
up vote 2 down vote accepted

Yes, the longer file name takes up a few more bytes of space in the directory, but a few bytes is insignificant compared to the size of the file, even if the file is only a single 4K block.

share|improve this answer
Is there a definitive way of knowing this difference without simply creating files and looking at my available free space? I thought (but this is why I was asking), that a file inode took up a fixed sized block. – Hooked Jun 19 '13 at 14:39
@Hooked, an inode is a fixed size, but the directory entry (where the name is) pointing to that inode is not. It's size is a few bytes for the inode number, the file type, and whatever the length of the name is. Also directories with many entries get dirhash enabled, which adds extra entries of the hash of the name in sorted order so name lookup can be fast in very large directories. – psusi Jun 19 '13 at 14:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.