find big files

Find the files that take the most room, on a whole disk or in a folder.

  • disks
  • files

Steps

  1. find / -xdev -type f -size +500M 2>/dev/null

    every file over 500 MB on this disk

  2. find ~ -type f -size +100M -exec ls -lh {} +

    files over 100 MB in your home, with their sizes

  3. du -ah ~ 2>/dev/null | sort -h | tail -20

    the 20 biggest files and folders in your home

  4. ls -lhS

    the files in this folder, biggest first

Notes

  • -xdev keeps find on one disk; 2>/dev/null hides the folders you may not read.
  • +500M means more than 500 MB; k and G work too.

Commands used

  • find
  • du
  • ncdu

Each has a page in lore: lore find opens it.