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
Hard disk usage is 100% Busy for any command npcrao AIX 3 11-14-2007 03:18 AM
Usage find command raman1605 SUN Solaris 2 08-04-2007 10:45 PM
Disk Usage in Unix Shilpi Shell Programming and Scripting 3 08-03-2007 05:14 AM
find command usage zp523444 UNIX for Advanced & Expert Users 1 11-28-2005 09:33 PM
disk usage command on unix? gandoura UNIX for Dummies Questions & Answers 3 10-22-2005 11:55 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-22-2008
Registered User
 

Join Date: Mar 2008
Posts: 23
Disk Usage in GB and Unix command to find the biggest file/folder

Hi All,

Please help me out

1) Command to find the disk usage in GB. I know that du -k will give in kilobites.

2) How to find the Biggest file/folder in a given set of files/folders.

Thanks in advance

Regards,
Manas
Reply With Quote
Forum Sponsor
  #2  
Old 04-22-2008
DukeNuke2's Avatar
Soulman
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 1,487
Quote:
Originally Posted by manas6 View Post
1) Command to find the disk usage in GB. I know that du -k will give in kilobites.
read the manpage of "du" and you may find the switch "-h" (some older os versions don't have "-h"!).

Quote:
Originally Posted by manas6 View Post
2) How to find the Biggest file/folder in a given set of files/folders.
you have to write a script to sort the files or maybe "find" has a solution to sort the files... read also the manpage of "find".

hth,
DN2
Reply With Quote
  #3  
Old 04-22-2008
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 798
Quote:
Originally Posted by manas6 View Post
1) Command to find the disk usage in GB. I know that du -k will give in kilobites.
check if this works for you:
Code:
du -kh
Reply With Quote
  #4  
Old 04-22-2008
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
Quote:
2) How to find the Biggest file/folder in a given set of files/folders.
try this
Code:
du -sk * | sort -nr | more
Reply With Quote
  #5  
Old 04-22-2008
Registered User
 

Join Date: Mar 2008
Posts: 23
Hi All,

Thanks for your valuable inputs.

Manas
Reply With Quote
  #6  
Old 04-24-2008
Registered User
 

Join Date: Apr 2008
Posts: 1
du command

Hi

Try to du -g -s *


Regards
Thembela
South Africa
Reply With Quote
  #7  
Old 04-28-2008
Cameron's Avatar
Registered User
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 490
Neither ...
` du -g -s * ` or ` du -kh * ` work under HP-UX.
' du -sk * | sort -nr | more ` worked a treat.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
du -sk, sort

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:52 PM.


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