Home » Infrastructure » Linux » Want to view .gz file contents from particular text onwards.
Want to view .gz file contents from particular text onwards. [message #659010] Wed, 04 January 2017 02:50 Go to next message
Manoj.Gupta.91
Messages: 239
Registered: March 2008
Location: Delhi
Senior Member
Hi All,

I've a huge .gz file which contain only one big log file. I want to see contents of that file from particular text onwards.

Eg. File
This is my first file.
It is used as sample.
I want to see it's contents by scrolling down.
How can I do it.

Eg. I want to search "sample" and see file contents from first occurrence onward.

I can use

zcat filename
zcat filename | grep sample
zgrep sample
but these commands only show me particular lines where as I want to scroll down from first occurrence.

Thanks & Regards
Manoj
Re: Want to view .gz file contents from particular text onwards. [message #659017 is a reply to message #659010] Wed, 04 January 2017 03:58 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
I would look into using awk/gawk coupled with zcat.
Re: Want to view .gz file contents from particular text onwards. [message #659019 is a reply to message #659010] Wed, 04 January 2017 04:48 Go to previous message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

This question bears no real connection with Oracle database.
Please find a more appropriate forum.
The topic is locked. /forum/fa/448/0/
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).

Previous Topic: Error "ORA-27102:out of memory" during database creation using dbca
Next Topic: sqlplus ORA-12547: TNS:lost contact
Goto Forum:
  


Current Time: Thu Mar 28 05:44:52 CDT 2024