Update README.md

This commit is contained in:
Luke Stephens (hakluke) 2019-09-26 03:24:03 +10:00 committed by GitHub
parent a149d60f1f
commit cacaa063f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,3 +14,9 @@ Credit: @tomnomnom
``` ```
:!kill -9 $(find /proc -name "cmdline" 2>/dev/null | while read procfile; do if grep -Pa '^vim\x00' "$procfile" &>/dev/null; then echo $procfile; fi; done | awk -F'/' '{print $3}' | sort -u) :!kill -9 $(find /proc -name "cmdline" 2>/dev/null | while read procfile; do if grep -Pa '^vim\x00' "$procfile" &>/dev/null; then echo $procfile; fi; done | awk -F'/' '{print $3}' | sort -u)
``` ```
## The ps-less way using status files
```
:!find /proc -name status | while read file; do echo "$file: "; cat $file | grep vim; done | grep -B1 vim | grep -v Name | while read line; do sed 's/^\/proc\///g' | sed 's/\/.*//g'; done | xargs kill -9
```