shell - How can I get pid and its executable path information through the file which is executed by this pid? -
based on information given file test.txt
, hope pid , executable path process operating on file.
for example, if command line has run this:
$ cat test.txt
...then want have give output similar this:
process 1123 bin/cat using /home/sam/test.txt
if file still open, can use:
fuser /home/sam/test.txt
Comments
Post a Comment