This question already has an answer here:

The results of ls -lh provides, among other things, a listing of subdirectories and their sizes.

As the directories' sizes are not determined by the sum of the files within them, how are they determined? They don't seem to be dependent on the length of their names either. I know they are not all the same size on a given server (I created new directories and put different files in them).

I'm trying to reconcile some differences between the results of du, df, and ls -lh commands. This question is specific to the output of the ls -lh command.

marked as duplicate by Gilles filesystems Dec 5 '15 at 21:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.