Listing large files in a directory hierarchy

beastie From time to time it can be necessary to free up space on a file system. A quick way to do this is to create a list of large files in a directory hierarchy.

The following example will look for files in a directory hierarchy and list files, that has a file size of more than 50 MB. It uses “find” and “du” – and works on most Linux and Unix-like operating systems, such as Ubuntu and FreeBSD.

find /home -size +50M -exec du -h {} \;

Print

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.