Solved

finding my lost linux disk space without adding software

Posted on 2013-01-25
3
156 Views
Last Modified: 2013-01-27
I can run scripts on stock redhat 5 boxes.

I am looking for a good du script or two to find out what eats up the disk space by
large file
full directory

Here is what I found with google

Sudo
 
 
 
du  -s *      | sort -n
 
du -x --block-size=1024K | sort -nr | head -10


I am looking for a better script as well as how not to mess with /proc
0
Comment
Question by:TIMFOX123
3 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 400 total points
Comment Utility
It is more like troubleshooting.

First, issue command
df -hT

This will show you the percentage of used partitions.  Once you know which partition is of concern, you can use find command to find large files in that location, say /home

Then you issue command
find /home -type f -size +1G

This will show you files bigger than a GB.  If you have too many of these, you can then change your criteria like -size +10G or so.  You will be able to find the big files.
0
 
LVL 76

Assisted Solution

by:arnold
arnold earned 100 total points
Comment Utility
Fuser md lsof can be used to track a process that may have an open filehandle to a file that was deleted.  A soon as the processID restarted. The space is reclaimed by the filesystem.
lsof -f /var
0
 

Author Closing Comment

by:TIMFOX123
Comment Utility
thank you both very much!!!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now