LinuxCommandLibrary

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

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community