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
Ascending & Descending order numbers pravani1 Shell Programming and Scripting 6 06-03-2008 08:43 AM
Disk Usage harikamamidala Shell Programming and Scripting 4 08-16-2007 03:22 PM
disk usage (df vs du) gfhgfnhhn UNIX for Advanced & Expert Users 8 09-23-2006 09:06 PM
disk usage karthikosu UNIX for Dummies Questions & Answers 2 06-29-2006 04:48 PM
Disk usage (Mac OS 10.4) H1tokori UNIX for Dummies Questions & Answers 5 12-05-2005 07:37 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-14-2001
asutoshch asutoshch is offline
Registered User
  
 

Join Date: Mar 2001
Location: Calcutta, India
Posts: 49
Question how to see disk usage in descending order

What is the command used by sysadmin to see the disk used by the users in descending order of their disk usage?
  #2 (permalink)  
Old 09-14-2001
patvdv's Avatar
patvdv patvdv is offline
Registered User
  
 

Join Date: Jul 2001
Location: Belgium
Posts: 83
du

You could use a du on all the /home subdirectories (or where their home directories are located):


Code:
cd /home
du -k -s * | sort -k1 -g -r

  #3 (permalink)  
Old 09-14-2001
asutoshch asutoshch is offline
Registered User
  
 

Join Date: Mar 2001
Location: Calcutta, India
Posts: 49
On Soalris, the above command gives error. Can u let me know where the problem is. Thanks
  #4 (permalink)  
Old 09-14-2001
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
What error does it give you?
  #5 (permalink)  
Old 09-14-2001
asutoshch asutoshch is offline
Registered User
  
 

Join Date: Mar 2001
Location: Calcutta, India
Posts: 49
It gives error with -g option. It says illegal option -g. when i tried without -g option it worked. but it was not in asending order of use.
  #6 (permalink)  
Old 09-14-2001
patvdv's Avatar
patvdv patvdv is offline
Registered User
  
 

Join Date: Jul 2001
Location: Belgium
Posts: 83
Numeric

The -g option stands for a numeric sort. It works in Linux, possibly the Solaris 'sort' has different options. Check with man sort which option matches a numeric sort in Solaris and use that.

The -r option is for reverse order. Again this might be different in Solaris.
  #7 (permalink)  
Old 09-14-2001
Optimus_P Optimus_P is offline Forum Advisor  
flim flam flamma jamma
  
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
with a little help from the sort man page

OS: solaris
Ver: 7
Hardware: ultra 5


Code:
for i in `awk -F":" '{ print $1 }' /etc/passwd`;do
du -s `find . -user $i`|sort -nr
done


Last edited by Optimus_P; 09-14-2001 at 11:31 AM..
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:01 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0