Looking for large files on your Linux server
November 26th, 2008
Categories: Hot Tips
I often need to find out what’s using up a lot of space in a user’s folder, or on a backup server.
The easiest way is to use Linux’s “du” or Disk Usage command.
The following command will show you the sizes of the different folders, and will only display it on that level – i.e it won’t show you the sub-folders:
[sourcecode language='sh']
du -h –max-depth=1 ./
[/sourcecode]
Alternatively you can use find, as such:
[sourcecode language='sh']
find / -size +2G -print
[/sourcecode]
This will find all files larger than 2GB
Leave a comment
| Trackback