Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A useful command I once knew.... 1

Status
Not open for further replies.

MethodMan1972

IS-IT--Management
Mar 11, 2006
15
DE
Hi All, a while back, I used a command to show me the filesystem tree, and which files under the location were using the most disk space. It was something like...

ls -l | du -sk | sort

Well along those lines anyways...

and the output was something like..

/var/bigfile1 <big number>
/var/bigfile2 <not as big number>

etc...

Can anyone provide the correct command and parameters please?

Many thanks
 
For the pwd use du -sk *|sort -rn - this will include the sizes of any directories.
To traverse the filesystem for a list of large files try
find . -xdev -ls|sort -rn +6
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top