Using “sort” on a “du” command in linux…

Leave a comment

June 20, 2012 by aubreykloppers

Here is a nice tip for you:

Sorting the sizes of your output of “du” (Disk Usage) is as easy as:

du -s * | sort -n -r | more

Breaking down:

du -s * = DiskUsage <do not enter into sub-directories> <all files in current directory>

| = PIPE

sort -n -r = SORT <Numerically> <Revered>

more = PageByPage

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

%d bloggers like this: