Solved

finding my lost linux disk space without adding software

Posted on 2013-01-25
3
157 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
ID: 38821106
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 77

Assisted Solution

by:arnold
arnold earned 100 total points
ID: 38823475
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
ID: 38825224
thank you both very much!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

895 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

15 Experts available now in Live!

Get 1:1 Help Now