Why is hard drive is full?
Just a few notes I needed recently to clean up a full Ubuntu hard drive.
Find out how much space left on all drives.
df -h -T
Find recently modified files, this will often point you to the cause of a recently full drive.
In this example find files modified in the past 24 hours. By default recursive from current directory.
find -mtime -1
Find files of size
find / -size +10M -ls
I got into a bad habit of used sudo when deleting multiple files. I think because it asked me to confirm, and I didn't look up the man page to see it was as simple as adding either -I or -f (force). So just as a reminder not to use sudo.
Delete all files ending in .foo in the current directory.
rm -I ./*.foo
References:
https://help.ubuntu.com/community/find
https://www.linux.com/news/hardware/peripherals/8247-disk-usage-analysis-and-cleanup-tools
Comments