• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2259
  • Last Modified:

More Information needed from UNIX "df" command


I am trying to generate the report for companies management which can show -
1.file system
2. total space allocated
3. total free space
4. % of free space
5. used space
6. % of used space

the df -k command gives me the information about points - 1,  2 (I assume this is the total space allocated), 3 and 6. To get the information about points 4 and 5 which flags should I use or is there any other command that I can use to get the above information? Also df -k gives me the information about Iused and %Iused. Can you please explain me what is this?

I am not really a UNIX person and I need  to generate this report for management meeting urgently. I will highly appreciate your help!
1 Solution

The Iused & %Iused are related to filesystem inodes. Inodes are information nodes which basically give information about files and directories created within the file system (each inode represents a file or a directory).


The remaining can be calculated.

Kent OlsenData Warehouse Architect / DBACommented:

unix systems typicall separate files by ownership onto their own logical devices.  The root drive, for example often contains just enough files to boot unix, the kernel, and the system commands.  User files and installed products are stored in separate file systems.  So items 3, 4, 5, and 6 have marginal value, other than curiosity.  If the root drive is full, you're not adding another system file no matter how much room is left on other devices.  If the home directory is full, you aren't going to add another file to your home directory even if all of the other file systems have free space.

Since you're putting together management reports, use df -m.  That will display the space in megabytes.  df -k displays in kilobytes.  With today's large file systems that's a lot of digits to glance at.

iused and %iused refer to the inodes on the device. Inodes are typically reserved with a device is created or formatted.   In the simplest of terms, the inodes are the directory entries.  When you create a file, the information about that file is stored in an inode.  When you run out of inodes, the device is full.

Good Luck,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now