Disk Usage in GB and Unix command to find the biggest file/folder


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Disk Usage in GB and Unix command to find the biggest file/folder
# 1  
Old 04-22-2008
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  
Old 04-22-2008
Quote:
Originally Posted by manas6
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
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  
Old 04-22-2008
Quote:
Originally Posted by manas6
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  
Old 04-22-2008
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  
Old 04-23-2008
Hi All,

Thanks for your valuable inputs.

Manas
# 6  
Old 04-24-2008
du command

Hi

Try to du -g -s *


Regards
Thembela
South Africa
# 7  
Old 04-28-2008
Neither ...
` du -g -s * ` or ` du -kh * ` work under HP-UX. Smilie
' du -sk * | sort -nr | more ` worked a treat.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I need to find out disk usage for particular indexes for different hosts

Need disk utilisation script for particular indexes on few hosts (3 Replies)
Discussion started by: Krish5v
3 Replies

2. UNIX for Beginners Questions & Answers

UNIX commands to display the biggest file by size in a directory

Hello guys, Please i need to know the biggest files in my directory let's say$ >du -h | egrep 'M|G|G' 195M ./TMP 3.6M ./TP_DEC2012 146G . But here the result it's giving me the biggest directory in the path. Actually i want to know the biggest file in 146G . Can anyone... (6 Replies)
Discussion started by: gillesi
6 Replies

3. UNIX for Beginners Questions & Answers

UNIX utility to find difference in folder, file and contents of file against a base version

Hi, I am trying to find out whether there are any Unix utilities that compares folders, files and contents within the file and provides a comprehensive report. The comparison can be against base version of a folder and file with content. Can you please let me know of such a utility? Thanks,... (6 Replies)
Discussion started by: Sripathi_ks
6 Replies

4. Shell Programming and Scripting

How to find biggest word in a file....?

With any cmd like sed grep ask etc... (1 Reply)
Discussion started by: sidpatil
1 Replies

5. Shell Programming and Scripting

find biggest number inside file

Hi, I wanna find the biggest number inside of a file this is kind of example of file: 9 11 55 then i just wanna print out the biggest number i had try sed filenale | sort -k1,1n | paste -s -d',' - but i had no success ... (7 Replies)
Discussion started by: prpkrk
7 Replies

6. Shell Programming and Scripting

Unix - Disk usage command

Hi, I need a command that gives me the user who is using more space in the unix box (1 Reply)
Discussion started by: abinaya
1 Replies

7. UNIX for Advanced & Expert Users

Unix Command to rename a file in a zipped folder

Hi, I am into automation work. Is there any UNIX command to rename a file in a zipped folder, without unzipping it..??? Thanks in advance.. (1 Reply)
Discussion started by: Victoria.Sam
1 Replies

8. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

9. Shell Programming and Scripting

Disk Usage in Unix

Hi, Please let me know how do we write a piece of code to find the disk usage in UNIX (3 Replies)
Discussion started by: Shilpi
3 Replies

10. UNIX for Dummies Questions & Answers

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. (3 Replies)
Discussion started by: gandoura
3 Replies
Login or Register to Ask a Question