Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-13-2003, 06:00 PM   #1
Registered: Aug 2003
Posts: 234

Rep: Reputation: 30
log file editing....

i've got a huge log file and i only need to get out logs on certain do i trime the file down....or have some kind of redirection to another file that only writes the logs with the dates i want.....any help would be appreciated....

Old 11-13-2003, 07:08 PM   #2
Senior Member
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
let's say the file is /var/log/secure:

cat /var/log/secure | grep "Nov 11" > ~/trimmed_secure

this filters everything from Nov 11 and puts it into a new file trimmed_secure
Old 11-13-2003, 07:16 PM   #3
Registered: May 2003
Location: philadelhpia pa
Posts: 92

Rep: Reputation: 15
grep "Nov 11" /var/log/secure > ~/trimmed_secure

no need, for the cat (unless you get a litle lonely)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
The X Server won't log in after i tried editing the Xsession file on Fedora Core 3 SHERB142 Fedora 3 06-07-2005 01:18 PM
File editing digger Linux - Newbie 3 01-28-2004 04:42 PM
How to control log file size in /var/log? yan Linux - General 2 10-13-2003 06:00 PM
what log file generator that support squid log? heero82 Linux - Software 2 07-11-2003 09:52 PM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 09:38 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration