[vox-tech] What I Did Tonight

Charles Polisher vox-tech@lists.lugod.org
Fri, 22 Mar 2002 07:14:35 -0800


On Thu, Mar 21, 2002 at 11:28:48PM -0800, Richard S. Crawford wrote:
> Tonight, in a desperate bid to free up some space on my hard drive, I went 
> ahead and created a new directory on my huge unused /u2 partition called 
> bin.  Then I copied everything from /bin to /u2/bin.  Then I deleted /bin 
> and created a symbolic link from /bin -> /u2/bin.
> 
> Then I rebooted.
> 
> Shit.
> 
> This probably won't be too hard to recover from.  But if anyone else has 
> any advice on how to free up hard drive space that doesn't involve tricks 
> that will make my computer forget how to start up, I'm all ears... or 
> eyes... or something.  Right now, doing df -h reveals that / is at 100% 
> capacity.
> 
> 
> 
> Sliante,
> Richard S. Crawford

Here's a neat trick:
	cd /
	du -ks * | sort -nr |more
lists the directories in size order, with total
disk used in k. This lets you find the places
that are the disk hogs!

Another snippet that might help:
	cd foo
	find . -atime +60
finds files that havn't been accessed for 60 days or more.

and of course:
	cd foo
	find . \( -name core -o -name "*~" \)  -ok rm -f \{ \} \;
to nuke all core files, and all temporary files 
(name ends with ~) that haven't been accessed for 60 days.

And, you've checked /var/log/* for out-of-control log
files, yes?

Happy hunting...

Chuck Polisher
-- 
The man who sets out to carry a cat by its tail 
learns something that will always be useful and 
which never will grow dim or doubtful. -- Mark Twain