grep, zgrep, less and zless regexp examples

Grep all files with mask:

grep "regex to find" /var/log/lb-*.net/nginx/error.log

Grep all zipped files with mask:

zgrep "regex to find"  /var/remote-log/nodejs-1*.net/node/error.log.*

Less all files with mask:

less /var/log/lb-*.net/nginx/error.log

Grep all zipped files with mask:

zless  /var/remote-log/nodejs-1*.net/node/error.log.*

Tail all files with mask:

tail -f /var/log/lb-*.net/nginx/error.log

LEAVE A COMMENT