Got a page on an error today:
Error, DISK_SPACE:/var – hostname – UNIX – EMAIL – 100% full, 0MB free, 722MB total
Did a quick ‘du’ on /var filesystem and found out the culprit directory:
# du -sk * | sort -rn | more
232013 preserve
222272 tmp
62607 sadm
58204 cfengine
44270 spool
40355 adm
510 cron
503 orca
343 apache
Apparently, /var/preserv is used a temporary place holder used to store vi or ex temporary data. So, doing a quick recursive listing (`ls -lR`) showed the date stamps of the files inside /var/preserve/users.
# ls -aslt | more
total 176126
4 drwxrwxrwt 84 root bin 1536 Dec 13 19:09 ..
2 drwx—— 2 user group 512 Nov 21 07:44 .
192 -rw——- 1 user group 98304 Nov 21 07:44 Exaaa0000019883
64 -rw——- 1 user group 32768 Oct 27 03:40 Exaaa0000028082
170624 -rw—= 1 user group 87294772 Oct 9 21:24 Exaaa0000013066
64 -rw——- 1 user group 32768 Oct 8 21:53 Exaaa0000015814
72 -rw——- 1 user group 6864 Sep 28 2007 Exaaa0000026859
One more ‘du’ to find out which one takes the most space, and I’ll start deleting there:
# du -sk * | sort -rn| more
88061 user1
19338 user2
19225 user3
12653 user4
11881 user5
8685 user6
7649 user7
Surprisingly *grin*, user1 take the most space.. so it’s bye bye to those temporary files..
#cd /var/preserve/user1/
# ls -last
# rm Exa*