I was trying to inspect a disowned curl
process, which was started in an earlier login. I can see that it (PID 17193) is still running:
$ ps aux | grep curl
17193 jack 7700 3692 S 1:00 20:48 curl https://examples.com/file.ext -O
18124 jack 3576 876 S 0:00 21:18 grep curl
And I was trying to see how far the downloading is going, but the output of it has been deleted:
$ ls -l /proc/17193/fd
total 0
lrwx------ 1 jack users 64 May 19 20:50 0 -> /dev/pts/1 (deleted)
lrwx------ 1 jack users 64 May 19 20:50 1 -> /dev/pts/1 (deleted)
lrwx------ 1 jack users 64 May 19 20:50 2 -> /dev/pts/1 (deleted)
lrwx------ 1 jack users 64 May 19 20:50 3 -> socket:[2343571]
l-wx------ 1 jack users 64 May 19 20:50 4 -> /dir/file.ext
What I should do to see the output? Thanks!
sudo strace -p17193 -s9999 -e write
(tested). Although your process must be death by now, it may help others reaching out. – rellampec Oct 23 '22 at 12:21