Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. # Print all matching lines (without the filename
  2. # or the file path) in all files under the current
  3. # directory that start with "access.log" that
  4. # contain the string "500". Note that there are no
  5. # files named "access.log" in the current directory,
  6. # you will need to search recursively.
  7. #
  8.  
  9. my try:
  10. bash(0)> find . -type f -name "access.log*" -exec grep -Hn "500" {} \;
  11. ./var/log/httpd/access.log:3:69.16.40.148 - - [09/Jan/2017:22:34:33 +0100] "GET /pages/create HTTP/1.0" 500 3471
  12. ./var/log/httpd/access.log:4:225.219.54.140 - - [09/Jan/2017:22:35:30 +0100] "GET /posts/foo?appID=xxxx HTTP/1.0" 500 2477
  13. ./var/log/httpd/access.log.1:5:2.71.250.27 - - [09/Jan/2017:22:41:26 +0100] "GET /pages/create HTTP/1.0" 500 2477
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement