More Information needed from UNIX "df" command

Posted on 2007-10-12
Last Modified: 2013-11-17

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!
Question by:MPJD
    LVL 40

    Expert Comment


    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.

    LVL 45

    Accepted Solution

    Hi MPJD,

    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,

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now