[ale] Looking to free up some space.
Chris Fowler
cfowler at outpostsentinel.com
Wed Jul 29 13:56:57 EDT 2009
cd /var/log
su
for i in `find . -type f`
do
cat < /dev/null > $i
done
On Wed, 2009-07-29 at 13:43 -0400, Brandon Checketts wrote:
> John Temple wrote:
> > I got a disk full message today so I am looking to free up some space
> > but not having much luck finding it.
> >
> > When I started hda2 had 100% Use I know that I have deleted Gigs but
> > only says that I have free'd up 3/4 of a Gig.:
> > [john at macworld-lsrv ~]$ df -h
> > Filesystem Size Used Avail Use% Mounted on
> > /dev/hdb2 57G 7.5G 47G 14% /
> > /dev/hda1 99M 16M 78M 17% /boot
> > tmpfs 506M 0 506M 0% /dev/shm
> > /dev/hdb1 142G 44G 92G 33% /fileserver
> > /dev/hdb3 27G 173M 26G 1% /tmp
> > /dev/hda3 31G 214M 29G 1% /usr/local
> > /dev/hda2 76G 743M 72G 2% /var
> > /var/www/html 76G 743M 72G 2% /home/john/WebServer
> > /fileserver/ftp 142G 44G 92G 33% /home/john/FTPServer
> > /fileserver/Projects 142G 44G 92G 33% /home/john/Projects
> >
> > When I tried to find the big guys this is what I get:
> > [john at macworld-lsrv ~]$ du /home/john/WebServer | sort -n -r | head -n 10
> > 263940 /home/john/WebServer
> > 153284 /home/john/WebServer/signs
> > 22840 /home/john/WebServer/ant_computers
> > 20772 /home/john/WebServer/Poison
> > 11700 /home/john/WebServer/candle
> > 9868 /home/john/WebServer/ant_computers/catalog_backup
> > 9860 /home/john/WebServer/ant_computers/catalog_backup/catalog
> > 8152 /home/john/WebServer/candle/PDF
> > 8084 /home/john/WebServer/images
> > 7028 /home/john/WebServer/usage
> >
> > I am running FC 6, any suggestions on finding and cleaning up some of
> > the junk?
> > --
> > John Temple
> > cjtemple at gmail.com <mailto:cjtemple at gmail.com>
> >
>
> My first bet:
>
> lsof |grep deleted
>
>
> This will show open files that have been deleted. The file system doesn't
> actually unlink them until the file is not in use, whereas 'du' just goes
> through a current directory listing (which doesn't include deleted files)
>
> lsof should show you which user and PID is responsible, then you can restart
> that program.
>
> This might happen when deleting a log file while a process is still writing to it.
>
> If that doesn't identify anything, you could look through lsof to find any open
> files with a huge size. That might indicate that a file was truncated while it
> was being written to.
>
>
> Thanks,
> Brandon Checketts
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list