2018-11-12 08:33:03 +00:00
|
|
|
---
|
|
|
|
layout: page
|
|
|
|
category_title: File System
|
|
|
|
category-page: fs
|
|
|
|
tags: working directory current position where
|
|
|
|
author: Mirko Ponzio
|
|
|
|
title: PWD
|
|
|
|
---
|
|
|
|
|
2018-11-12 09:11:18 +00:00
|
|
|
<h2>Description</h2>
|
2018-11-12 08:33:03 +00:00
|
|
|
<p>
|
2018-11-12 09:11:18 +00:00
|
|
|
<code>PWD</code> (abbreviation of print working directory, it gives you the
|
|
|
|
corrent directory) it is a command of the operation system Unix and Unix-like,
|
|
|
|
and in general of the systems POSIX, that show on the standard output the
|
|
|
|
absolute pathname on the corrent directory.
|
|
|
|
Since a command line interface cannot provide graphic pictures of the file
|
|
|
|
system structure, it must have a different way of representing it.
|
|
|
|
Think of the file system tree as a maze, and you are standing in it. At any
|
|
|
|
given moment, you are located in a single directory.
|
|
|
|
Inside that directory, you can see its files and the pathway to its parent
|
|
|
|
directory and the pathways to the subdirectories of the directory in which you
|
|
|
|
are standing.
|
2018-11-12 08:36:58 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2018-11-12 08:57:00 +00:00
|
|
|
The working directory is the directory where you are standing in. So for
|
|
|
|
knowing where you are, you must use the pwd command.
|
2018-11-12 08:33:03 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
|
2018-11-12 08:36:58 +00:00
|
|
|
<h2>Options</h2>
|
2018-11-12 08:33:03 +00:00
|
|
|
<p>
|
2018-11-12 08:57:00 +00:00
|
|
|
<ul>
|
2018-11-12 09:11:18 +00:00
|
|
|
<li> -L : Display the logical current working directory.</li>
|
2018-11-12 08:33:03 +00:00
|
|
|
|
2018-11-12 09:11:18 +00:00
|
|
|
<li>-P : Display the physical current working directory (all symbolic
|
2018-11-12 08:57:00 +00:00
|
|
|
links resolved).</li>
|
|
|
|
</ul>
|
2018-11-12 09:11:18 +00:00
|
|
|
<br><br>
|
2018-11-12 08:33:03 +00:00
|
|
|
If no options are specified, the -L option is assumed.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-12 08:36:58 +00:00
|
|
|
<h2> Examples <h2>
|