Riddle me on this one

Anthony de Boer adb-SACILpcuo74 at public.gmane.org
Mon Jan 23 18:53:30 UTC 2012


William Muriithi wrote:
> I have a system that is maxing up the disk space and was trying to
> find a logs to purge.  The odd thing is, the root of the log directory
> reports 3.6G, but all the logs file living on that directory do not
> even come close to the sum of all the logs file size added up.
> 
> du -h /var/log
> 4.0K	/var/log/unattended-upgrades
> 4.0K	/var/log/apparmor
> 4.0K	/var/log/landscape
> 4.0K	/var/log/dist-upgrade
> 56K	/var/log/apt
> 40K	/var/log/ConsoleKit
> 824K	/var/log/exim4
> 4.0K	/var/log/news
> 4.0K	/var/log/jetty
> 12K	/var/log/fsck
> 3.6G	/var/log

What you're seeing here is the total space used in /var/log and each
of its subdirectories, and most of your space usage is in files that
are in /var/log itself.  Try:

ls -s /var/log

and you should see something useful to the tune of a couple of
gigabytes.  Beyond that, likewise with /var/log/exim4 will show you
824K of logs, and the rest is hardly worth bothering.

Note that deleting something like /var/log/messages that syslogd is
still writing doesn't free up the space, nor are you likely to want to
delete recent information.  Past generations of rotated logs eventually
need to be deleted, though, and sometimes log rotation is broken and you
have a *huge* messages file that needs to be split once in awhile.

-- 
Anthony de Boer
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list