Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tyingq
on Nov 26, 2023
|
parent
|
context
|
favorite
| on:
Unix shells and the current directory
Where it exists, there's also /proc/self/cwd, so you can do: readlink -e /proc/self/cwd
rezonant
on Nov 26, 2023
[–]
While 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
on Nov 26, 2023
|
parent
[–]
ls -l also works. I often do
ls -l /proc/`pidof foo`/fd
to see what files a taciturn process is working on
bobbyi
on Nov 27, 2023
|
root
|
parent
[–]
lsof is also good for seeing what files a process is using
https://www.thegeekstuff.com/2012/08/lsof-command-examples/
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: