LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-05-2006, 02:53 AM   #1
markvc
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: Disabled
Find big files


The 'df' command shows me my disk is full.
How can I find the biggest consumers/files?
I have tried "du -c" but this is not realy what I need.
OS = Red Hat EL 3.4
 
Old 12-05-2006, 03:26 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

du -sh * (start from /)

From there you can 'zoom in' on the bigger directories to finally find the biggest files.

Hope this helps.
 
Old 12-05-2006, 03:55 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Code:
du / | sort -nr | less
- reverse sorted, so the worst offenders will be first. Will take a while, so be patient.
 
Old 12-05-2006, 05:57 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
xdiskusage and baobab do it in graphical mode.

edit: btw, if in case you have kde, konqueror has an amazing filesize view mode, its quite useful

Last edited by nx5000; 12-05-2006 at 07:16 AM.
 
Old 12-05-2006, 07:14 AM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I found this little script at LinuxGazette.

#!/bin/bash
# diskhogs.sh - a script to find what's hogging the hard disk.
# relace /home/* with the directory to be searched.]

for dirname in `du -s /home/* | sort -m | cut -f2- | head -15`
do
echo ""
echo Big directory: $dirname
echo 15 largest files in that directory are:
find $dirname -type f -printf "%kk %p \n" | sort -m | head -15
done
exit 0
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux find to find files with multiple patterns subu_s Programming 6 12-15-2010 12:15 AM
How to print big files quickly husrah Linux - Newbie 4 08-30-2006 09:37 AM
php5 connot find big libxml2? xjtdy888 Linux - Networking 1 05-29-2006 02:03 AM
how to find out how big is a directory xpucto Linux - Newbie 7 10-04-2005 02:12 AM
How to handle big files > 2Go ??? 242VDM242 Linux - Newbie 9 04-06-2005 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:29 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