Pwd Cracking In Uplink
   HOME

TheInfoList



OR:

pwd (print working directory) is a
shell Shell may refer to: Architecture and design * Shell (structure), a thin structure ** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses Science Biology * Seashell, a hard outer layer of a marine ani ...
command Command may refer to: Computing * Command (computing), a statement in a computer language * command (Unix), a Unix command * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on A ...
that reports the
working directory In computing, the working directory of a process is a directory of a hierarchical file system, if any, dynamically associated with the process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd function, or just c ...
path A path is a route for physical travel – see Trail. Path or PATH may also refer to: Physical paths of different types * Bicycle path * Bridle path, used by people on horseback * Course (navigation), the intended path of a vehicle * Desir ...
to
standard output Standard may refer to: Symbols * Colours, standards and guidons, kinds of military signs * Standard (emblem), a type of a large symbol or emblem used for identification Norms, conventions or requirements * Standard (metrology), an object t ...
. Although often associated with
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
, its predecessor
Multics Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
had a pwd command (which was a short name of the print_wdir command) from which the Unix command originated. The command is part of the
X/Open X/Open group (also known as the Open Group for Unix Systems and incorporated in 1987 as X/Open Company, Ltd.) was a consortium founded by several European UNIX systems manufacturers in 1984 to identify and promote open standards in the field of info ...
Portability Guide since issue 2 of 1987. It was inherited into the first version of POSIX.1 and the
Single Unix Specification The Single UNIX Specification (SUS) is a standard for computer operating systems, compliance with which is required to qualify for using the "UNIX" trademark. The standard specifies programming interfaces for the C language, a command-line shell, ...
. It appeared in
Version 5 Unix Research Unix refers to the early versions of the Unix operating system for DEC PDP-7, PDP-11, VAX and Interdata 7/32 and 8/32 computers, developed in the Bell Labs Computing Sciences Research Center (CSRC). The term ''Research Unix'' first appe ...
. The version bundled in
GNU Core Utilities The GNU Core Utilities or coreutils is a collection of GNU software that implements many standard, Unix-based shell commands. The utilities generally provide POSIX compliant interface when the environment variable is set, but otherwise offers ...
was written by Jim Meyering. The command is available in other shells and
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s including
SpartaDOS X SpartaDOS X (or SpartaDOS 4.0) is a disk operating system for the Atari 8-bit computers that closely resembles MS-DOS. It was developed and sold by ICD in 1987-1993, and many years later picked up by the third-party community SpartaDOS X Upgrade ...
, PANOS, and KolibriOS.
PowerShell PowerShell is a shell program developed by Microsoft for task automation and configuration management. As is typical for a shell, it provides a command-line interpreter for interactive use and a script interpreter for automation via a langu ...
provides as an alias for the
cmdlet PowerShell is a shell program developed by Microsoft for task automation and configuration management. As is typical for a shell, it provides a command-line interpreter for interactive use and a script interpreter for automation via a langu ...
Get-Location. An equivalent command in COMMAND.COM and
Command Prompt A command-line interface (CLI) is a means of interacting with software via commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternativ ...
is the cd command with no arguments. On Windows CE 5.0, cmd.exe includes a pwd command. The
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Op ...
equivalent is show default. The numerical computing environments
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
and
GNU Octave GNU Octave is a scientific programming language for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly ...
include a pwd function with similar functionality. The command is implemented as a
shell builtin In computing, a shell builtin is a Command (computing), command or a Subroutine, function, exposed by a Shell (computing), shell, that is implemented in the shell itself, instead of an external computer program, program which the shell would load a ...
in many
Unix shell A Unix shell is a Command-line_interface#Command-line_interpreter, command-line interpreter or shell (computing), shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command languag ...
s including sh, ash, bash, ksh, and zsh. It can be implemented with the
POSIX The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
getcwd() or getwd() functions.


Examples

The following examples are based on a typical Unix-based implementation. With no arguments, the command writes the working directory path to the terminal: $ cd /home/example $ pwd /home/example Display the working directory without any symbolic link info. If at a directory /home/symlinked that is a symlink to /home/realdir: $ cd /home/symlinked $ pwd -P /home/realdir Display the working directory with symbolic link info. Note: POSIX requires that the default behavior be as if the -L switch were provided. $ pwd -L /home/symlinked


Shell variables

POSIX shells set the following
environment variable An environment variable is a user-definable value that can affect the way running processes will behave on a computer. Environment variables are part of the environment in which a process runs. For example, a running process can query the va ...
s while using the command: ; OLDPWD : The previous working directory ; PWD : The current working directory


See also

*
Breadcrumb (navigation) A breadcrumb or breadcrumb trail is a graphical control element used as a navigational aid in user interfaces and on web pages. It allows users to keep track and maintain awareness of their locations within programs, documents, or websites. The te ...
, an alternative way of displaying the work directory * List of POSIX commands * pushd and popd


References


Further reading

*


External links

* * * * * * * * {{Core Utilities commands Multics commands Unix SUS2008 utilities Plan 9 commands Inferno (operating system) commands IBM i Qshell commands File system directories