Nightly logs not separated

Discuss Applications

Nightly logs not separated

Postby Basher52 » Fri Apr 16, 2010 7:30 pm

I usually get some 4 to 6 nightly logs every day.
the first one is always just that log, but all others are "melted" together in one big M...F... file :(
And since one of the logs log every row affected it sure gets big and this log always gets in the top of everything else, thus making me has to browse down, waaaay down to see the others.
I've tried to fix this for the last two releases of Fedora, but no luck :(
Is there a way to do that?
(If anyone even know what I'm talking about)
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Void Main » Sat Apr 17, 2010 5:49 am

Can you be more specific? Which logs, which programs are creating those logs?
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Basher52 » Sat Apr 17, 2010 1:28 pm

Most logs I create my own.
One is where I copy some files to my "backup" directory and later rar them to one file, split them up and mail my gmail account.
another is my nightly rkhunting log, another is a log from some database reorganizations.
A long time ago, like Fedora 5 or 6, they did create their own mail but now I only get one for the daily logwatch and then all other in one.
The later is very boring to scroll through and look at since most things are at the bottom.
btw, is there a way to in VI to scroll right away to the bottom of a file?
I've looked and tried lots but nothing seems to work.
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Postby Copperhead » Mon Apr 26, 2010 4:34 am

In vi, to get to the bottom of a file, just look at the number of lines you have once you open your file. Then, enter command mode and enter the last line number. Suppose your file has 3432 lines. Just go to command mode and:

:3432 <enter>
Copperhead
scripter
scripter
 
Posts: 83
Joined: Wed May 14, 2003 1:12 am
Location: Los Angeles, CA, USA

Postby Void Main » Mon Apr 26, 2010 6:20 am

In vi/vim just press "G" (upper case G) which means "Go to bottom".
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Copperhead » Tue Apr 27, 2010 9:11 am

There is a package called "logrotate" that you could install that does most of that for you.
Copperhead
scripter
scripter
 
Posts: 83
Joined: Wed May 14, 2003 1:12 am
Location: Los Angeles, CA, USA

Postby Basher52 » Tue Apr 27, 2010 9:49 am

logrotate is installed but I created my own logrotators for some other logs that I have.
User avatar
Basher52
guru
guru
 
Posts: 881
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE


Return to Applications

Who is online

Users browsing this forum: No registered users and 0 guests