LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2006, 01:00 PM   #1
s0n|k
Member
 
Registered: Feb 2006
Distribution: RHEL4
Posts: 80

Rep: Reputation: 15
Linux Utility


Is there a linux utility that can show me like the top 3 files in which use more hard drive space?
 
Old 02-26-2006, 01:06 PM   #2
ckoniecny
Member
 
Registered: Oct 2005
Posts: 162

Rep: Reputation: 30
You could run the find command:

Code:
find / -size +100000c -print
This would display files over 100 MB.
 
Old 02-26-2006, 01:19 PM   #3
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
Code:
find / -name "*" -exec ls -l {} \; | grep -e "^[^t][^o][^t][^a][^l]"  | sort -g -r -k 5 | head -n 20
This will show you the 20 largest files on your harddrive, their size, and location.
 
Old 02-26-2006, 01:40 PM   #4
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Or even better:

Code:
find / -printf "%k %p\n" | sort -g -r | head -n 20
The previous one:

Code:
find / -name "*" -exec ls -l {} \; | grep -e "^[^t][^o][^t][^a][^l]"  | sort -g -r -k 5 | head -n 20
will mostly work, except it will list some files twice - once when ls -l is executed on the files' containing directory, and another time when ls -l is executed on the files themselves.
 
Old 02-26-2006, 02:08 PM   #5
s0n|k
Member
 
Registered: Feb 2006
Distribution: RHEL4
Posts: 80

Original Poster
Rep: Reputation: 15
ahhh I see. Thanks guys!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
does linux have a scandisk utility? spyghost Linux - Newbie 14 02-15-2006 05:16 PM
is there a linux utility.... linuxnube Linux - Software 4 01-22-2004 01:45 PM
simple linux utility that does this? squip Linux - Newbie 1 10-07-2003 03:49 PM
Help with a linux utility Ripper951 Linux - General 6 01-12-2003 01:00 PM
Make Utility and RT Linux twizzard Linux - Newbie 3 06-28-2002 08:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration