7

Question

What are the differences between the following commands?

df

df -h

df -l

Feedback

Information is greatly appreciated. Thank you.

sdale1930
  • 1,147
  • 2
  • 9
  • 11

3 Answers3

11

First of, df reports file system disk space usage. That is, it displays the total size, the used and available space for each of your mounted partitions.

df

is the default behavior, without arguments. Sizes are given in 1K-blocks (that is, 1024 bytes). Local filesystems (i.e., on hard drives on the present machine) as well as remote filesystems (e.g., mounted via NFS on a network) are listed.

df -h

tells df to display sizes in Gigabyte, Megabyte, or Kilobyte as appropriate, akin to the way a human would describe sizes. Actually, the h stands for "human-readable".

df -l

tells df to display only local filesystems, but no remote ones.

Malte Skoruppa
  • 13,196
  • 5
  • 57
  • 65
2

df - disk space shown in 1K blocks

df -h - disk space shown in human readable form (KB, MB, GB)

df -l - limit listing to local file systems

This info can be found in man pages. Try man df.

mbiber
  • 840
  • 5
  • 12
1

Type in terminal for each command you want to know :

man <the command>

it will list its usage and options .

in your example type man df

nux
  • 38,017
  • 35
  • 118
  • 131