Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Determine the file sizes of a directory

  • Please log in to reply
No replies to this topic

#1 Guest_Plimsol_*


  • Guests

Posted 07 May 2004 - 12:06 PM

Unix/Linux has a nice command that will allow you to find out how much disk space a particular directory is using. This command is the du.

There are two flags that you will want to use with this command:

The -h flag will specify that you want the sizes to be listed in human readable format like K for Kilobyte or G for Gigabyte.

The -s flag will produce a summary instead of giving you information about every subdirectory.

You give the directory you would like to check as the argument. If no directory is specified, it will you your current directory.

The syntax for this command is:

du -sh directoryname

BC AdBot (Login to Remove)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users