2018-11-12 08:33:03 +00:00
|
|
|
---
|
|
|
|
layout: page
|
|
|
|
category-page: fs
|
2018-11-12 10:47:50 +00:00
|
|
|
category-title: FileSystem
|
2018-11-12 08:33:03 +00:00
|
|
|
tags: working directory current position where
|
|
|
|
author: Mirko Ponzio
|
2018-11-12 10:47:50 +00:00
|
|
|
title: pwd
|
2018-11-12 08:33:03 +00:00
|
|
|
---
|
|
|
|
<p>
|
2018-11-12 10:47:50 +00:00
|
|
|
The command <code>pwd</code>(abbreviation of print working directory, it returns the
|
2018-11-12 09:11:18 +00:00
|
|
|
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
|
2018-11-12 10:47:50 +00:00
|
|
|
absolute pathname on the corrent directory.<br>
|
2018-11-12 09:11:18 +00:00
|
|
|
Since a command line interface cannot provide graphic pictures of the file
|
2018-11-12 10:47:50 +00:00
|
|
|
system structure, it must have a different way of representing it.<br>
|
2018-11-12 09:11:18 +00:00
|
|
|
Think of the file system tree as a maze, and you are standing in it. At any
|
2018-11-12 10:47:50 +00:00
|
|
|
given moment, you are located in a single directory.<br>
|
2018-11-12 09:11:18 +00:00
|
|
|
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
|
2018-11-12 10:47:50 +00:00
|
|
|
are standing.<br>
|
|
|
|
|
2018-11-12 08:57:00 +00:00
|
|
|
The working directory is the directory where you are standing in. So for
|
2018-11-12 10:47:50 +00:00
|
|
|
knowing where you are, you must use the pwd command.<br><br>
|
2018-11-12 08:33:03 +00:00
|
|
|
|
|
|
|
|
2018-11-12 10:47:50 +00:00
|
|
|
<h3>Flags</h3>
|
2018-11-12 08:57:00 +00:00
|
|
|
<ul>
|
2018-11-12 10:47:50 +00:00
|
|
|
<li> -L : Display the logical current working directory.</li>
|
|
|
|
<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 08:33:03 +00:00
|
|
|
|
2018-11-12 10:47:50 +00:00
|
|
|
If no options are specified, the -L option is assumed.
|
|
|
|
</p>
|