[Linux command] df

Although this command is known by almost all of the developer, anyway I record it just to remind that it is a very important to display the amount of available disk space, whether there is a disk mounted … blabla, ok stop, you gonna to get which command it is, here is a copy from its manuel :

Continue reading

By Bo Posted in Linux Tagged

[Linux Commands] show file/directory/partition size

# show the partitions sizes 
# (Filesystem, Size, Used, Avail, Use%, Mounted on)
df -h

# show directory size
du -s -h /your_dir_name/

# show file size
du -s -h your_file_name

Tips :

  • -h is for humain, that you could easily understand the size in
    kilobyte, megabyte or gigabyte
  • -s is for summary, instead of listing all files, it will display
    only the total.