The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 06:18 AM
Usage find command raman1605 SUN Solaris 2 08-05-2007 01:45 AM
Disk Usage in Unix Shilpi Shell Programming and Scripting 3 08-03-2007 08:14 AM
find command usage zp523444 UNIX for Advanced & Expert Users 1 11-29-2005 12:33 AM
disk usage command on unix? gandoura UNIX for Dummies Questions & Answers 3 10-23-2005 02:55 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-22-2008
manas6 manas6 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 27
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
  #2 (permalink)  
Old 04-22-2008
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is online now Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,947
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
  #3 (permalink)  
Old 04-22-2008
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
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
  #4 (permalink)  
Old 04-22-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
Quote:
2) How to find the Biggest file/folder in a given set of files/folders.
try this
Code:
du -sk * | sort -nr | more
  #5 (permalink)  
Old 04-23-2008
manas6 manas6 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 27
Hi All,

Thanks for your valuable inputs.

Manas
  #6 (permalink)  
Old 04-24-2008
LovelyTee LovelyTee is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 1
du command

Hi

Try to du -g -s *


Regards
Thembela
South Africa
  #7 (permalink)  
Old 04-28-2008
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 499
Neither ...
` du -g -s * ` or ` du -kh * ` work under HP-UX.
' du -sk * | sort -nr | more ` worked a treat.
Sponsored Links
Closed Thread

Bookmarks

Tags
du -sk, sort

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 04:41 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