Scenario: Imagine you login to a server and you find that the disk is filling up rapidly. Either by using df -h or du -h -d1 /<dir> or getting errors like no more disk space left etc. How do you figure out who is filling up the file?
Solution: Let’s say the file in question is /var/log/badd.log and it’s rapidly filling up.
First step is to use lsof to figure out which process has that file open. To write to a file, any process has to first open that file. So the process will show up in lsof, which is a program to “list open files”. With any luck your output will show up like this -
The first thing I noticed after installing Fedora 14 was that there are updates available for my packages. And not a few, more than 400 updates! Sizing about 500mb!
Now, I use a lame internet plan of 256kbps. Updating all the packages in one go will make me keep this system on for about 5 hours. Thats not possible for me. So I needed a way to update few packages everytime and keep doing that whenever I find time.