LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pwdx

Show working directory of a process

TLDR

Print current working directory of a process
$ pwdx 1234
copy
Print working directory of multiple processes
$ pwdx 1234 5678
copy

SYNOPSIS

pwdx [option...] pid...

DESCRIPTION

pwdx reports the current working directory of a process. It reads this information from /proc/[pid]/cwd and displays the directory path for each specified process ID.

PARAMETERS

-V, --version

Output version information and exit
-h, --help
Output help screen and exit

INSTALL

sudo apt install procps
copy
sudo dnf install procps-ng
copy
sudo pacman -S procps-ng
copy
sudo apk add procps-ng
copy
sudo zypper install procps
copy
brew install procps
copy
nix profile install nixpkgs#procps
copy

CAVEATS

The process must be accessible to the user running pwdx. For processes owned by other users, root privileges may be required to access the working directory information.

HISTORY

pwdx was created by Nicholas Miell in 2004 and is part of the procps-ng package. It resembles a SunOS command of the same name.

SEE ALSO

ps(1), pgrep(1), lsof(8), readlink(1), proc(5)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid