Stands for the print paintings listing. This command will output the entire trail of the present present listing. It handiest takes a few choices -P
and -L
which get to the bottom of directories for Symbolic hyperlinks.
Common syntax for pwd
command:
$ pwd [OPTION...]
Show bodily listing with out symlinks
pwd -P
The -P
possibility handiest prints absolutely the trail of the listing, fending off symbolic hyperlinks within the output.
Instance: Printing absolutely the trail by means of changing the SymLink with the ExampleDir listing.

Show operating listing with symlinks
pwd -L
This feature prints the trail to the present operating listing, together with symlinks.
Instance: Positioned in SymLink, let’s run the command to look the output with a symbolic hyperlink.

Show variable content material
var=$(pwd)
Retailer the worth of the pwd
command in a variable.
Instance: Storing the worth of the pwd
command within the NewVar variable and exhibiting its price from this variable.

Show earlier operating listing
echo "$OLDPWD"
Use this command to print the former operating listing trail.
Instance: Checking the former location (Desktop/ExampleDir) within the document gadget and outputting it.

The publish How to Use pwd Command in Linux gave the impression first on Hongkiat.
WordPress Website Development