oneliners/bash/pv_of_pid.sh

6 lines
207 B
Bash
Raw Normal View History

2021-08-23 18:28:18 +02:00
#!/bin/bash
# get interactive pipeview of all files a PID has opened. Works also with forked PIDs (takes last pid, of pidof, which is usually the oldest pid)
pv -d $(pidof firefox |awk '{print $NF;exit}')