Use lsof directly from the shell.
Section: Inspection tools
List files for a PID manually
bash
bash
sudo lsof -p 12345Explanation
Pairs well with htop when you need copyable terminal output.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Inspection tools
Attach strace manually
Use the PID from htop with a direct shell command.
List open files with lsof
Inspect file descriptors for the selected process.
Trace system calls with strace
Attach strace to the selected process if installed.
Inspect CPU affinity from the shell
Complement htop when tracking placement or pinning.
Use htop to locate a PID, then kill from shell
Classic shell companion flow.