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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -