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:

  • history   history command example Linux bash history keeps every command a user typed in the command line terminal into a file named .bash_history. Here is an example of Linux history command with no option running i… Read More
  • jobs   jobs command example Print currently running jobs and their status. Syntax jobs [OPTIONS] [PID] Options: -c --command Print the command name for each process in jobs -g --group Only… Read More
  • hostname   hostname Print or set system name SYNTAX $ hostname With no arguments, `hostname' prints the name of the current host system. With one argument, it sets the current host name to the specified str… Read More
  • xargs   xargs command examples Copy all images to external hard-drive # ls *.jpg | xargs -n1 -i cp {} /external-hard-drive/directory Search all jpg images in the system and archive it. # find / -name *.jpg -type… Read More
  • yum yum command examples To install apache using yum. $ yum install httpd To upgrade apache using yum. $ yum update httpd To uninstall/remove apache using yum. $ yum remove httpd … Read More

0 comments:

Post a Comment