Find the 20 largest files in a filesystem.

Every sysadmin knows this. There’s always some application/user that fills up any given FS with “stuff”. Here’s a way to find out what’s clogging up your FS:

find /tmp -type f -exec ls -la {} \; | sort -r -n -k 5,5 | head -20

Replace the /tmp with whatever directory you want to scan. 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s