How to Get the Size of a Directory in Linux

Posted by linuxize on Apr 4, 2019 7:43 AM EDT
linuxize.com; By linuxize
Mail this story
Print this story

The du command displays the amount of file space used by the specified files or directories.

When listing the contents of a directory using the ls command, you may have noticed that the size of the directories is almost always 4096 bytes (4 KB). That’s the size of space on the disk that is used to store the meta information for the directory, not what it contains.

The command you’ll want to use to get the actual size of a directory is du which is short for “disk usage”. We’ll show you how to use this command.

Full Story

  Nav
» Read more about: Groups: Linux

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.