Linux - GREP command

About

grep filters content based on certain strings. And the '>' will dump output out to a file. So you can do something like this:

cat yourlogfile.txt|grep 404

which would type out your logfiles, but then filter it so only lines with '404' are actually displayed (the grep command does the filtering). Quick way to get your 404 errors. Or better yet, pump it out to a file:

cat yourlogfile.txt|grep 404>404errors.txt

which would create a file called 404errors.txt which contains only the 404 errors from your logfile.

Articles Related

  • Bookmark "Linux - GREP command" at del.icio.us
  • Bookmark "Linux - GREP command" at Digg
  • Bookmark "Linux - GREP command" at Ask
  • Bookmark "Linux - GREP command" at Google
  • Bookmark "Linux - GREP command" at StumbleUpon
  • Bookmark "Linux - GREP command" at Technorati
  • Bookmark "Linux - GREP command" at Live Bookmarks
  • Bookmark "Linux - GREP command" at Yahoo! Myweb
  • Bookmark "Linux - GREP command" at Facebook
  • Bookmark "Linux - GREP command" at Yahoo! Bookmarks
  • Bookmark "Linux - GREP command" at Twitter
  • Bookmark "Linux - GREP command" at myAOL
 
linux/grep.txt · Last modified: 2010/11/12 10:39 by gerardnico