Input: df -k
Output:
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 10332220 443748 9785150 5% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 45475864 1688 45474176 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
/dev/dsk/c0t0d0s3 10332220 3513927 6714971 35% /usr
I want to omit the 1st line Filesystem kbytes used avail capacity Mounted on
from the output.
I used df -k | tail -n+2
in linux to get exactly what i wanted, but in SunOs I get
zenvo% df -k | tail -n+2
usage: tail [+/-[n][lbc][f]] [file]
tail [+/-[n][l][r|f]] [file]
How can i achieve the Required output:
/dev/dsk/c0t0d0s0 10332220 443748 9785150 5% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 45475864 1688 45474176 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
/dev/dsk/c0t0d0s3 10332220 3513927 6714971 35% /usr
Note: No. of rows might change
The df command (short for disk free) is used to show the amount of free disk space available on Linux and other Unix-like systems and to understand the filesystems that have been mounted.
The df command displays information about total space and available space on a file system. The FileSystem parameter specifies the name of the device on which the file system resides, the directory on which the file system is mounted, or the relative path name of a file system.
The ps command shows the process identification number (listed under PID ) for each process you own, which is created after you type a command. This command also shows you the terminal from which it was started ( TTY ), the cpu time it has used so far ( TIME ), and the command it is performing ( COMMAND ).
Use the df command to show the amount of free disk space on each mounted disk. The usable disk space that is reported by df reflects only 90 percent of full capacity, as the reporting statistics allows for 10 percent above the total available space.
I know it's an old thread, but the shortest and the clearest of all:
df -k | sed 1d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With