Notice: Undefined index: searchOption in /home/vivekvermani/public_html/UnixCommand/searchUnixCommandsScripts.php on line 140
Unix Commands/Scripts for '#Grep -i'
Share

Search Unix Commands/Scripts


  Help us in improving the repository. Add new commands/scripts through 'Submit Commands/Scripts ' link.





Unix Commands/Scripts for '#Grep -i' - 3 Commands/Scripts found

 Sample 1. Tail log to see only lines containing an error / exception in last 5000 lines

tail -5000 /opt/WebSphere6/AppServer/profiles/Viva/logs/VivaWebClusterMemberPsc9800/SystemOut.log | grep -i "FileNotFoundException"

   Like      Feedback     tail  tail logs  check logs for errors  grep  grep -i  grep ignore case


 Sample 2. find occurences of a particular error in last n days

find /opt/WebSphere/AppServer/profiles/application/logs/ -iname "SystemOut*" -mtime -7 -exec zgrep "FileNotFoundException" {} ; >> logAnalysis.txt

   Like      Feedback     find  zgrep  -iname  0mtime  >>


 Sample 3. Finding text within .gz (zipped) file without unzipping them

zgrep -i Error *.gz

   Like      Feedback     grep  zgrep  zgrep -i  grep within zipped file



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus