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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the largest files in the system?

Status
Not open for further replies.

bipromeco

Technical User
Oct 9, 2002
11
0
0
US
Hello all
I want to find the files that are consuming more space in the server, the question is? Do you know a command that let me find the largets files in the system? Thanks in advance.

Regards!
 

du -k /dir | awk '$1>20000' | sort -nr

will find all files in directory /dir which are > 20k and sort in descending order. CaKiwi
 
try

find / -type f -size +3000 -exec ls -l {} \; | pg

3000 is 512 byte blocks just divide by 2 to give you MEG
so 3000/2 is 1500 find files size 1.5MB or greater in specified filesystem / or one stated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top