Saturday, April 26, 2014

df


df command examples

Displays the file system disk space usage. By default df -k displays output in bytes.

$ df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             29530400   3233104  24797232  12% /
dev/sda2            120367992  50171596  64082060  44% /home

df -h displays output in human readable form. i.e size will be displayed in GB’s.

linuxcare@rax-laptop:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              29G  3.1G   24G  12% /
/dev/sda2             115G   48G   62G  44% /home


Use -T option to display what type of file system.

linuxcare@rax-laptop:~$ df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on

/dev/sda1     ext4    29530400   3233120  24797216  12% / 
/dev/sda2     ext4   120367992  50171596  64082060  44% /home



Related Posts:

  • top   top command examples top command displays the top processes in the system ( by default sorted by cpu usage ). To sort top output by any column, Press O (upper-case O) , which will display all the possible columns… Read More
  • tar   tar command examples   Create a new tar archive. $ tar cvf archive_name.tar dirname/ Extract from an existing tar archive. $ tar xvf archive_name.tar View an existing tar archive. $ tar t… Read More
  • uname   uname command examples Uname command displays important information about the system such as — Kernel name, Host name, Kernel release number, Processor type, etc., Sample uname output from a Ubuntu laptop is … Read More
  • tail   tail command example Print the last 10 lines of a file by default. $ tail filename.txt Print N number of lines from the file named filename.txt $ tail -n N filename.txt View the content of the file in real… Read More
  • unzip unzip command examples To extract a *.zip compressed file: $ unzip test.zip View the contents of *.zip file (Without unzipping it): $ unzip -l jasper.zip Archive:  jasper.zip   Length  &… Read More

0 comments:

Post a Comment