Super User is a question and answer site for computer enthusiasts and power users. 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

For example, it shows the kernel as being 18M but the Applications folder as being 3.8K


share|improve this question

According to the man page for ls:

List information about the FILEs (the current directory by default).

ls is intended to show the size of the files on the file system, not to show the usage of a directory. du will show total usage of a file system object.

So ls is doing what it is supposed to do. While your Applications directory may contain files that use more than 3.8K, the Applications directory itself is really only 3.8K on the disk.

share|improve this answer

Because you're not on Windows, where the world pretends that directories have no space cost, and all directories are zero length. (Some parts of the Windows world pretend that the size of a directory is the cumulative size of all of the things contained in the directory.)

On Unices and Linux, the ls -l command, when displaying a directory entry that points to another directory, shows the size of the directory. It shows the amount of space devoted to actually storing the entries in the directory itself. For each directory entry, ls -l always shows the size of the node pointed to by that entry, be it file, symbolic link, or directory.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .