# ls -A . | while read name; do du -sk $name; done | sort -nr
This command sorts disk usage for all files in the current directory by size, in
decreasing order. If the file we suspect happens to be a directory, we can then
change into that directory, and re-run the preceding command to determine
what is taking up space within that directory. Continue these steps until you find the
desired file or files, at which point you can take appropriate actions.
OR
Large files can be located with the find command. For example,
to find all files in the root (/) directory
larger than 1 MB, type the following command:
find / -xdev -size +2048 -ls |sort -r +6
This will find all files greater than 1 MB and sort them in reverse
order with the largest files first.
I am sure there are lots of other ways to do it also? Maybe someone has a script
If I remember correctly there was a post in March 2002 that had a script I think it was March 22.........
Which will display the size of all files and directories in the current directory with the biggest being at the bottom. If the bottom-most item is a directory, then cd into that directory and run the du command again. Keep drilling down until you find the biggest files on your system. Einstein47 (How come we never see the headline, "Psychic Wins Lottery"?)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.