find big files
Find the files that take the most room, on a whole disk or in a folder.
disksfiles
steps
-
find / -xdev -type f -size +500M 2>/dev/nullevery file over 500 MB on this disk
-
find ~ -type f -size +100M -exec ls -lh {} +files over 100 MB in your home, with their sizes
-
du -ah ~ 2>/dev/null | sort -h | tail -20the 20 biggest files and folders in your home
-
ls -lhSthe files in this folder, biggest first
notes
-xdevkeepsfindon one disk;2>/dev/nullhides the folders you may not read.+500Mmeans more than 500 MB;kandGwork too.
commands used
findduncdu
Each has a page in lore: lore find opens it.
create a large file
Make a file of a given size, for testing disks, uploads or swap.
disk full but df says there is room
"No space left on device" with free gigabytes: the disk is out of inodes, the slots for files. Find the folder with too many small files.
free disk space
Find what fills a disk, then clear what is safe to clear: old package files, logs, caches.
see the size of files and folders
How much room each file and folder takes, here or anywhere, biggest last.