LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-22-2006, 12:37 PM   #1
farhan
Member
 
Registered: Feb 2003
Distribution: xNIX
Posts: 121

Rep: Reputation: 15
searching logs from .bz2 and alternate to tail


Hi

Just a quick question.
How to search through the log file which is in .bz2 format. I know to use zgrep to search the pattern through .gz but couldn't find anything for .bz2? I don't want to uncompress it first and then search through.


Second question
Is there any alternate to tail or cat which starts parsing the file from the end towards the start, rather starting from the beginning to the end?

Regards
Fani
 
Old 12-22-2006, 01:27 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by farhan
Hi

Just a quick question.
How to search through the log file which is in .bz2 format. I know to use zgrep to search the pattern through .gz but couldn't find anything for .bz2? I don't want to uncompress it first and then search through.
bzcat file|grep pattern


Quote:
Originally Posted by farhan
Second question
Is there any alternate to tail or cat which starts parsing the file from the end towards the start, rather starting from the beginning to the end?

Regards
Fani
Some distros have tac (cat reverse).



Cheers,
Tink
 
  


Reply



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
root-tail & logs CrEsPo Linux - Security 4 06-16-2005 09:33 PM
Firewall logs in logs and terminal... robbow52 Debian 7 11-20-2004 07:13 PM
Firefox logs user out? Where are error logs? case1984 Linux - General 0 10-09-2004 02:22 PM
Separate firewall logs and general logs dominant Linux - General 3 04-20-2004 01:26 AM
Apache logs - ???Linux logs??? mylo2003 Linux - General 3 08-07-2003 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 AM.

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