View previous topic :: View next topic |
Author |
Message |
MAST n00b


Joined: 31 Dec 2005 Posts: 74 Location: Spain
|
Posted: Sat Apr 01, 2006 3:55 pm Post subject: /var/log/messages takes up 8GB |
|
|
Hello, when I do a ls -lah /var/log/messages:
Code: |
# ls -lah /var/log/messages
-rw------- 1 root root 8,1G abr 1 17:50 /var/log/messages
|
I have been reading that is not very recommended to delete this file. How can I delete it safely? _________________ César ---------- ---------------- |
|
Back to top |
|
 |
polle Veteran


Joined: 28 Feb 2003 Posts: 1498 Location: Belgium
|
|
Back to top |
|
 |
Cybersorcerer Apprentice


Joined: 30 Mar 2004 Posts: 193 Location: somewhere over the rainbow
|
Posted: Sat Apr 01, 2006 4:07 pm Post subject: |
|
|
Hi,
well it is not recommended because you will loose the log data but i guess you can't search an 8Gig file anyway so
i would delete it. Also i would emerge and customize logrotate.
_________________ greetings
Cybersorcerer
--
Too old to die young
Dell Precision M90, Intel Centrino Duo T2700 @ 2.33GHz running Jackass! 2006.2 |
|
Back to top |
|
 |
linuxtuxhellsinki l33t


Joined: 15 Nov 2004 Posts: 700 Location: Hellsinki
|
Posted: Sat Apr 01, 2006 10:57 pm Post subject: |
|
|
If it's not really important server or something like that, I'd just save some 10000 last lines of it and rm the rest
Code: | mv /var/log/messages /var/log/messages2
tail -n10000 /var/log/messages2 > /var/log/messages
rm -f /var/log/messages2 |
_________________ 1st use 'Search' & lastly add [Solved] to
the subject of your first post in the thread. |
|
Back to top |
|
 |
g3npirate n00b

Joined: 23 Mar 2006 Posts: 48
|
Posted: Sun Apr 02, 2006 4:57 am Post subject: eh,? |
|
|
eh, its 8 gigs man, that to me seems rediculous for a log file. i'd say take your chance and delete it lol |
|
Back to top |
|
 |
zeek Guru


Joined: 16 Nov 2002 Posts: 480 Location: Bantayan Island
|
Posted: Sun Apr 02, 2006 7:32 am Post subject: |
|
|
If you're not familiar with setting up syslog-ng.conf to log to separate files, or using logrotate (a derelict from the early days of unix) then metalog is a better choice because it rotates logfiles by default. |
|
Back to top |
|
 |
|