4 ms·
Where it exists, there's also /proc/self/cwd, so you can do: readlink -e /proc/self/cwd
by tyingq 3y ago
Where it exists, there's also /proc/self/cwd, so you can do: readlink -e /proc/self/cwd
- rezonant 3y agoWhile readlink is the correct way to just read the link, I often just use `file ...` since it will also show the symbolic link destination (on GNU at least).
- didntcheck 3y agols -l also works. I often do ls -l /proc/`pidof foo`/fd to see what files a taciturn process is working on
- bobbyi 3y agolsof is also good for seeing what files a process is using https://www.thegeekstuff.com/2012/08/lsof-command-examples/ https://www.thegeekstuff.com/2012/08/lsof-command-examples/