Definition:
The pwd command stands for Present Working Directory.
When you run the pwd command, it displays your current directory.
Syntax:
pwd
Move with Absolute Path:
mv file1.txt /home/user/Documents/
Explanation:
file1.txtis moved to/home/user/Documents/folder.- This means
file1.txtwas in the current directory. - After using the
mvcommand, it moves to/home/user/Documents/. - The file name and content remain unchanged; only the location changes.
Example:
Command:
$ pwd
Explanation:
- Running the
pwdcommand displays the full path of the directory you are currently in. - You might be inside a folder but not know its exact location.
- For example, you could be in
/home/user/Documents. - When you run
pwd, it shows the full path of your current folder. - It does not change anything; it only tells you where you are in the file system.
