Solved

finding my lost linux disk space without adding software

Posted on 2013-01-25
3
159 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
video edge NVR Device Discovery Problem 4 46
is my large folder zipped corrupted 4 67
How to make a Bash alias that takes parameters 5 55
Can't ping New Linux Servers 40 68
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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…
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.

803 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