Search code examples
shellsolarisinode

Return iNode usage in Solaris


I am working to create a shell script to return iNode usage from a Solaris box.

The command I use to run is: df -F ufs -o i,

and say the output is:

    Filesystem             iused   ifree  %iused  Mounted on
    /dev/dsk/c1t0d0s1     248503 3443913     7%   /

The only part I need to catch is 7%. Please help me on the part that returns the %iused, and output it at the end of the script.

Thanks in advance!

Regards,

Madean


Solution

  • df -F ufs -o i | nawk 'NR>1 {print $4}'