2017 shaares
45 private links
45 private links
1 result
tagged
process
Pas plus simple :
I think I have a simpler solution here, just look for a directoy whose name corresponds to the PID you are looking for, under the pseudo-filesystem accessible under the /proc path. So if you have a program running, whose ID is 1199, cd into it:
$ cd /proc/1199
Then look for the fd directory underneath
$ cd fd
This fd directory hold the file-descriptors objects that your program is using (0: stdin, 1: stdout, 2: stderr) and just tail -f the one you need - in this case, stdout):
$ tail -f 1