The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix Top Command and sorting by CPU Usage davemehta UNIX for Dummies Questions & Answers 5 4 Weeks Ago 07:09 PM
Disk Usage in GB and Unix command to find the biggest file/folder manas6 UNIX for Dummies Questions & Answers 8 07-30-2008 04:54 AM
Hard disk usage is 100% Busy for any command npcrao AIX 3 11-14-2007 03:18 AM
Disk Usage in Unix Shilpi Shell Programming and Scripting 3 08-03-2007 05:14 AM
unix top command (memory usage) gfhgfnhhn UNIX for Advanced & Expert Users 2 03-17-2006 05:33 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 10-22-2005
Registered User
 

Join Date: Oct 2005
Posts: 1
disk usage command on unix?

hi,

Can anyone tell me how I make a tree on the console showing the largest folders on my UNIX system?

I want to know where are located the biggest files so I can free some disk space.

thanks a lot.
Reply With Quote
Forum Sponsor
  #2  
Old 10-22-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
What I like to do is cd to the top directory in the filesystem that is too full. And then I do:
du -sk * | sort -n
The last few lines are the most interesting. It is not a tree, but a tree would be too much info.
Reply With Quote
  #3  
Old 10-22-2005
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Quote:
Originally Posted by Perderabo
What I like to do is cd to the top directory in the filesystem that is too full. And then I do:
du -sk * | sort -n
The last few lines are the most interesting. It is not a tree, but a tree would be too much info.
How about using:
du -sk * | sort -nr | head -10

Then the first few lines will be the most interesting --GRIN--
Reply With Quote
  #4  
Old 10-22-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
I've tried stuff like that, but too often I go back and do the du again because I didn't see enough. My way, when I go back to the window I am probably looking at what I want to see. If not, I just scroll down. A "du -sk" is an expensive operation and I don't think it's wise to discard most of the data. We have some very large file systems. A "du -sk *" can take 10 minutes. No record, I know. But I'm bummed out if I need to repeat it. I also frequently have users breathing down my neck demanding immediate free space..

Of course, if I was getting paid by the hour, that would be whole 'nother stretch of road.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:46 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0