Show running processes with file name

If you want to see what executable the process 1234 is running:

ls -l /proc/1234/exe

If you want to see what files that process has open:

ls -l /proc/1234/fd

If you want to see the full command line with arguments:

tr '\0' '\n' 

If you prefer to use commands, lsof -p1234 shows all the files the process has open. ps uww 1234shows various pieces of information about process 1234 including the full command line.

你可能感兴趣的:(Linux,Linux)