Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/var/log/messages takes up 8GB
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
MAST
n00b
n00b


Joined: 31 Dec 2005
Posts: 74
Location: Spain

PostPosted: Sat Apr 01, 2006 3:55 pm    Post subject: /var/log/messages takes up 8GB Reply with quote

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 ---------- :D ----------------
Back to top
View user's profile Send private message
polle
Veteran
Veteran


Joined: 28 Feb 2003
Posts: 1498
Location: Belgium

PostPosted: Sat Apr 01, 2006 4:06 pm    Post subject: Reply with quote

maybe this helps:

https://forums.gentoo.org/viewtopic-t-426247-highlight-var+messages+huge.html
Back to top
View user's profile Send private message
Cybersorcerer
Apprentice
Apprentice


Joined: 30 Mar 2004
Posts: 193
Location: somewhere over the rainbow

PostPosted: Sat Apr 01, 2006 4:07 pm    Post subject: Reply with quote

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.

Code:
emerge logrotate

_________________
greetings

Cybersorcerer
--
Too old to die young

Dell Precision M90, Intel Centrino Duo T2700 @ 2.33GHz running Jackass! 2006.2
Back to top
View user's profile Send private message
linuxtuxhellsinki
l33t
l33t


Joined: 15 Nov 2004
Posts: 700
Location: Hellsinki

PostPosted: Sat Apr 01, 2006 10:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
g3npirate
n00b
n00b


Joined: 23 Mar 2006
Posts: 48

PostPosted: Sun Apr 02, 2006 4:57 am    Post subject: eh,? Reply with quote

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
View user's profile Send private message
zeek
Guru
Guru


Joined: 16 Nov 2002
Posts: 480
Location: Bantayan Island

PostPosted: Sun Apr 02, 2006 7:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum