linux command df and du

tags: learning linux

content

running 3 commands:

  • du -sh /: find the total disk usage under / directory
  • df -h /: finds which block device / is mounted on
  • du -shx /: finds the total disk usage under / directory, on the same filesystem as /

Note

i think a better way to understand the output of df -h is:

  • /dev/md126p2 under Filesystem is actually block device, it’s NOT meant to mean the type of the filesystem
  • in other words, change the header Filesystem to Block Device

up

down

reference