Linux commands for search

To search a gzipped file:
zcat mobileapi-29.txt.tar.gz | cut -d ‘ ‘ -f 7,11 –output-delimiter=’      ‘ | egrep -a -oe ‘mobileapi/api_app_session.php(.)* ‘  -oe ‘<(.)*>’

– Filter based on egrep condition.
zcat mobileapi-29.txt.tar.gz | cut -d ‘ ‘ -f 7,11 –output-delimiter=’      ‘ | egrep -a -e ‘mobileapi/api_app_session.php(.)* ‘

(www.thegeekstuff.com/2009/05/zcat-zless-zgrep-zdiff-zcmp-zmore-gzip-file-operations-on-the-compressed-files/)

– Find with print and  xargs  find … -print 0 | xargs

zcat, awk, egrep, grep, zgrep.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s