Skip to content

Instantly share code, notes, and snippets.

@joe-speedboat
Created January 7, 2018 18:16
Show Gist options
  • Save joe-speedboat/7cea89e3f6b4d606ab9be2d17c78e3a3 to your computer and use it in GitHub Desktop.
Save joe-speedboat/7cea89e3f6b4d606ab9be2d17c78e3a3 to your computer and use it in GitHub Desktop.
find logfiles for process with lsof
lsof | grep nginx | grep /var/ | sed 's|.* /|/|' | sort -u
@joe-speedboat
Copy link
Author

joe-speedboat commented Jan 7, 2018

[root@cloud ~]# lsof | grep nginx | grep /var/ | sed 's|.* /|/|' | sort -u
/var/log/nginx/access.log
/var/log/nginx/error.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment