From 827fe9978298da0ff41fb1f42f901b4d719281cb Mon Sep 17 00:00:00 2001 From: zeus Date: Mon, 23 Aug 2021 18:28:18 +0200 Subject: [PATCH] pipeview of PID --- bash/pv_of_pid.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 bash/pv_of_pid.sh diff --git a/bash/pv_of_pid.sh b/bash/pv_of_pid.sh new file mode 100644 index 0000000..a8cf64b --- /dev/null +++ b/bash/pv_of_pid.sh @@ -0,0 +1,5 @@ +#!/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}') +