disk usage command on unix?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers disk usage command on unix?
# 1  
Old 10-22-2005
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.
# 2  
Old 10-22-2005
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.
# 3  
Old 10-23-2005
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--
# 4  
Old 10-23-2005
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. Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Disk usage monitoring and record the disk used in last 24 hour

HI I am Trying to edit the below code to send email every day with difference of disk utilized in for last 24 hours but instead getting same usage everyday. can you please help me to point out where my calculation is going wrong. Thank you. ================= #!/bin/bash TODAY="at $(date... (0 Replies)
Discussion started by: Mi4304
0 Replies

2. UNIX for Beginners Questions & Answers

UNIX cluster disk usage report generation for yesterday & today and email

HI Team, I am trying to create a shell script to generate a yesterday and today report to compare and email in daily basis. can you please help me on the same. #!/bin/bash #Author: ******************* #Description: This script will return the following set of system information: ... (2 Replies)
Discussion started by: Mi4304
2 Replies

3. Shell Programming and Scripting

Need Generic command for disk space usage

Given this directory /web I need to get the current usage (in %) on Linux and Unix both using the same command on bash shell ? The command i tried was working on Unix (solaris) but does not filter the desired same value when run of Linux. My command df -h /web | awk '{print $5}' | sed -n... (5 Replies)
Discussion started by: mohtashims
5 Replies

4. Shell Programming and Scripting

Help with UNIX READ command usage..

Tested on : bash Will be implementing on : ksh I dont know if this is weird , or my idea of Unix stdin or stdout is completely messed up , but if I use the following command, I am getting a proper output. ls -l | head -1 | while read a ; do echo $a ;done and the output is soemthing like... (5 Replies)
Discussion started by: kumarjt
5 Replies

5. 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

6. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

7. UNIX for Dummies Questions & Answers

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 (8 Replies)
Discussion started by: manas6
8 Replies

8. AIX

Hard disk usage is 100 Percent Busy for any command

hi, AIX 5.3 For any command(say tar command) I am getting 100% busy for my hdisk. But my CPU and Memory is not busy and have more idle also. Please advice for any performance analysing. Thanks in Advance, (3 Replies)
Discussion started by: npcrao
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 Advanced & Expert Users

unix top command (memory usage)

in unix when i use top i get an output like this: load averages: 0.64, 0.57, 0.53 14:04:42 347 processes: 1 running, 1 waiting, 169 sleeping, 172 idle, 4 stopped CPU states: 16.4% user, 2.8% nice, 7.6%... (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies
Login or Register to Ask a Question