| #!/bin/bash | |
| if [ $# -ne 1 ] | |
| then | |
| echo "Usage: sudo whoisat /path" | |
| else | |
| path=$1 | |
| for proc in $(ps aux | awk '/pts/ {print $2}') | |
| do | |
| ls -l --time-style=+'%F %T' /proc/$proc/cwd 2>/dev/null | |
| done | grep $path | awk '{print $3, $4, $6, $7, $8, $NF}' | column -t | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pityonline commentedJun 9, 2015
Rename with specification