Skip to content

Instantly share code, notes, and snippets.

@zycon
Last active March 21, 2020 20:20
Show Gist options
  • Save zycon/d6e75e1fc3a677a885a0e27e18113ee5 to your computer and use it in GitHub Desktop.
Save zycon/d6e75e1fc3a677a885a0e27e18113ee5 to your computer and use it in GitHub Desktop.
process finding shortcuts
pgrep java
//list all processes/pid running in java
pgrep java | xargs kill
// chain kill
lsof -i:8080
//list pid running in port
lsof -i:8080 | awk 'NR==2 {print $2}'
//NR Number of record. Can be used for triming the colmn names , $2 Second colmn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment