Talk:pwd

Latest comment: 4 years ago by Vincent Lefèvre in topic Multics Precedent


[Untitled] edit

"...and other flavors as well"

Does this line make sense or is it a typo? will not change without revert.

````

Options edit

Does every "flavor" of pwd have -P and -L for options? I'm using Slackware 12.1. The man page for pwd doesn't mention them, but pwd --help displays them (with no explanation). I found this:

Options
    -P  : The pathname printed will not contain symbolic links.
    -L  : The pathname printed may contain symbolic[11]

GravityIsForSuckers (talk) 18:01, 31 October 2008 (UTC)Reply

PWD meaning. edit

Claim edit

On 21-Dec-2014 I made an edit on the claim that pwd should be understood as being "present working directory":

   # https://lists.debian.org/debian-user/1997/12/msg01064.html. 1997-12-11. "To determine your current or present working directory enter --> pwd <CR>"
   # http://www.linfo.org/current_directory.html 2007-07-12. "... the pwd (i.e., present working directory) command."
   # http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file "The present working directory can be displayed in Vim with: pwd"

First erase edit

Mr. Vincent Lefèvre just commented: "See http://www.linfo.org/pwd.html" and summarily erased my edit.

On why linfo.org is Unreliable as source edit

The site linfo.org reports conflicting concepts about "pwd". For "present" results in 10 hits, like:

   http://www.linfo.org/current_directory.html       ... run the pwd (i.e., present working directory) command.
   http://www.linfo.org/command_line_lesson_1.html   ... command to learn is pwd, which stands for present working directory.
   http://www.linfo.org/path.html                    ... using the pwd (i.e., present working directory) command ...

For "print" reveals only three links, similar to:

   http://www.linfo.org/pwd.html                     ... pwd is actually an acronym for print working directory.
   http://www.linfo.org/command.html                 ... pwd, which stands for print working directory

Even if there are more links for "present" than "print", we should agree that linfo.org is an unreliable source.

   http://gd.tuwien.ac.at/opsys/linux/ldp/LDP/www.debian.org/doc/manuals/user/ch-files.html
         4.2 Basic file commands - a tutorial     "pwd stands for Present Working Directory."

...This was an unsigned comment from User:JustToHelp
...I am signing it now. :). JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

Second erase edit

The only reliable sources are older UNIX man pages like this one from UNIX V7:
    User Commands                                              PWD(1)
   
    NAME
        pwd - working directory name
   
    SYNOPSIS
        pwd
   
    DESCRIPTION
        Pwd prints the pathname of the working (current) directory.
   
    SEE ALSO
        cd(1)

False quote edit

The page quoted by Schily above is just WRONG, incorrectly quoted.

The Unix man pages (Version 7) are available here:

        http://pubs.opengroup.org/onlinepubs/9699919799/

And searching for pwd leads here:

        http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pwd.html
No, Schily is correct and you're wrong. Your URL corresponds to POSIX.1-2008 (Issue 7) (and you're quoting the 2013 edition), while Unix v7 was released in 1979, i.e. 30 years before! − Vincent Lefèvre (talk) 20:31, 23 December 2014 (UTC)Reply
Well my quote was correct, but it was edited User:JustToHelp to what you did see. Schily (talk) 13:49, 26 December 2014 (UTC)Reply

The relevant part of the page is then (correctly) reproduced here:

   NAME
   
        pwd - return working directory name
   
   SYNOPSIS
   
       pwd [-L|-P]
   
   DESCRIPTION
   
       The pwd utility shall write to standard output an absolute pathname of the current working directory,
       which does not contain the filenames dot or dot-dot.

An independent source of such page is the web archive:

        http://web.archive.org/web/20110516200602/http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pwd.html
This is not the UNIX.V7 man page but rather the POSIX man page, so you made a false quote. Schily (talk) 10:51, 23 December 2014 (UTC)Reply

Older ? edit

Lets take a look at the contents of older docs in the claim of Schily: "The Single UNIX Specification"
Warning: Most of the data for the "opengroup.org" is behind a PAY wall. Some links are available for frMaybe. I don't think so. However your claimed source is unable to support a definition with the word "print...".ee, but I could not be sure that they will remain so. I'll provide web.archive.org links where possible.
Specifically, Version 1 is only available paying.
Issue 4:

The document for "Commands and Utilities, Issue 4, Version 2" is available only in pdf in here:

        http://www.opengroup.org/openbrand/pubs/catalog/c436.htm

Version 2:

The Single UNIX Specification, Version 2 (1997) is here:

        http://pubs.opengroup.org/onlinepubs/007908799/xcu/pwd.html


and here:

        https://web.archive.org/web/20120928214846/http://pubs.opengroup.org/onlinepubs/007908799/xcu/pwd.html


In none of those pages for the command pwd is there any mention of the word "print".

So: no claim to "print ...." could be made from such UNIX references. JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

Reliable sources edit

Debian is definitely an unreliable source. Schily (talk) 15:57, 22 December 2014 (UTC)Reply

Maybe. I don't think so. However your claimed source is unable to support a definition with the word "print...".

The "Hands-on Guide to theRed Hat® ExamsRHSCA™ and RHCE® Cert Guide" (to which I can not freely link here) states that:

   "...pwd Shows the present working directory..."

According to you Debian is unreliable, Is Red-Hat "RHCE® Cert Guide" also unreliable?

JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

You falsified my quote. My quote of course is correct and it verifies that UNIX V7 and many others uses Print Working Directory. Here is again the correct UNIX.V7 pwd man page:
User Commands                                              PWD(1)

NAME
    pwd - working directory name

SYNOPSIS
    pwd

DESCRIPTION
    Pwd prints the pathname of the working (current) directory.

SEE ALSO
    cd(1)

BTW: it is very bad style to modify other people's statements on a talk page! Schily (talk) 10:49, 23 December 2014 (UTC)Reply

Difference between name and action edit

That a command does print some output to the screen does not mean that it must be named print or that print must be in any part of it's description. For example: the command "ls" indeed prints the contents of a directory on the screen. However, the name of "ls" is almost universally understood to be "list files". It is not "pdc" (print directory contents) nor "pdf" (print directory files), nor some other silly name. It is just "L.i.S.t.". A very clear example of a command for which its name is very different than its actions is the command "print". Yes, the command print could "print" some output to the screen, but its main use is related to see and edit MIME(Mailcap) files. JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

Overall comments edit

Note that I provided http://www.linfo.org/pwd.html not because it was a trusted reference, but because you (JustToHelp) also provided a linfo.org link, meaning an obvious contradiction there. Note also that the user who added http://www.linfo.org/pwd.html said "Although it is often thought of as standing for present working directory, pwd is actually an acronym for print working directory." Thus before claiming that pwd stands for present working directory, more research should be done.

I agree that more research on your part will be helpful. JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

There's the original historical meaning (i.e. the very first one), on which I don't know anything (and it may be difficult to find a reliable source), and the one that is considered as correct nowadays. Whether it is considered a good choice or not is not the subject here.

What is the subject here?, then. JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

Regarding your 3 links:

  1. The first one is just a mail in a Debian list, thus completely unreliable. Moreover it doesn't say that pwd stands for present working directory (and the poster may have not known).

Maybe, but is the oldest one I was able to find at the time. It comes from 1997 and it shows that at that time the meaning was actively used. It should be noted that this is an issue of "language use" and not a technical definition. As such, the oldest recorded use of the term gives relevance to the term itself. I may be persuaded to accept that BOTH uses are valid. Just erasing the one you don't like is NOT the answer. JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

  1. The second one is a linfo.org link (see above).
  2. The third one concerns a vim command, thus is different (vim authors may choose different terminology).

That shows AGAIN, that pwd was understood to be "present .... " at the time. Again, plain rejection of what you don't like is not the correct answer. JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply


More reliable sources are official documentation of the pwd command. For instance, GNU coreutils has always said: "pwd - Print working directory", starting with the initial commit in 2001.

Well, coreutils is the result of the merging of several packages, one of which is sh-utils. That is an older source of the pwd command, one for which I found this link from (August 1999):
http://rpm.pbone.net/index.php3/stat/45/idpl/516415/numer/1/nazwa/pwd
But, yes, GNU has consistently presented "print..." in the manual for the command. In any case. The use of "present..." has been documented before 1999. Understanding present as "the current one", a very easy to find alternative meaning of the word "present...":
http://www.thefreedictionary.com/present
. As such, it is not difficult to understand why "present ..." and "current ..." are both valid and synonymous. JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

The pwd documentation in the Solaris manual says: "The pwd command (print working directory) displays..." (for several versions of the manual). The V.E.R.A. dictionary says: "PWD Print Working Directory". Arnold Robbins's Unix in a Nutshell book also uses "print working directory".

Concerning the notion of working directory, POSIX either says "current working directory" or just "working directory". No such thing as present working directory. So, there's no good reason why pwd would stand for present working directory, while print working directory makes more sense.

And present is a synonym of current, thus "present working directory" means the same. JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

There are terms defined by standards, and you must stick with them, not use what you think is a synonymous. − Vincent Lefèvre (talk) 20:36, 23 December 2014 (UTC)Reply

Note that the Debian User Reference Manual is obsolete (as said on the page). Its reliability is questionable.

Vincent Lefèvre (talk) 22:51, 22 December 2014 (UTC)Reply

Correct, Debian is not related to UNIX and has no historical background. We however have the the UNIX.V6 pwd man page, see also source at [12] from 1974, the UNIX.V7 man page source at [13] from 1979 and even the pwd man page from, UNOS - the first UNIX clone driven by some former AT&T employees in 1980:
pwd     prints working directory name

(END. next section is format)...

pwd

(END. next section is description)...

pwd  prints the  working (or current) directory,  from  where the
request was initiated, as an absolute path from the root.

(END. next section is options)...

none

(END. next section is notes)...

none
There is no doubt about the historical meaning of the name pwd. Schily (talk) 11:11, 23 December 2014 (UTC)Reply

What obsolete means is that "it is very old" and not current. All that it says is that the manual WAS present and valid at an older time. As such, is just another sample of the same concept: "present" also means "current". JustToHelp (talk) 03:48, 23 December 2014 (UTC)Reply

The Debian user manual was present in the past, but did not constitute an official source. There may be errors and they will never be fixed as this manual is now obsolete and no longer maintained. — Vincent Lefèvre (talk) 20:39, 23 December 2014 (UTC)Reply

Pwd DOES NOT mean "present working directory" edit

I started a new section because the previous sections were so incredibly confusing and hard to make sense of. pwd means "present working directory". I know because I learned UNIX back when the utilities were being created, and I clearly remember it meaning "present working directory". BTW, the man page examples do NOT say "print working directory". So whoever used the man page as "proof" for "print working directory" just lost all credibility. Of course, the man page does not say "present working directory" either. So the man page is neutral on the meaning. But I remember what it meant around when the command was created. It would never have been called "print working directory". That's totally not Unix style. 174.24.228.1 (talk) 05:11, 12 January 2015 (UTC)Reply

Unsourced claims do not help. If you believe you are right, you should be able to give WP:RS. Note that all reliable sources that have been discovered so far mention "print working directory". Schily (talk) 11:14, 14 January 2015 (UTC)Reply
Please list those sources that say the meaning is "print working directory". 174.24.228.1 (talk) 12:24, 14 January 2015 (UTC)Reply
The Solaris manual is explicit. The GNU Coreutils manual also strongly suggests that the meaning is "print working directory" since this is what is in the title of the pwd section. Of course this doesn't provide information on the historical meaning, but old sources as mentioned above don't use the word "present", while the word "print" is used ("pathname" too, so that it could be ambiguous). Vincent Lefèvre (talk) 12:54, 14 January 2015 (UTC)Reply
Thank you for the brief reply with the two sources. Much easier to digest than the verbose and confusing previous content on this talk page. You are right, those two sources are in favor of "print working directory". But I wonder when the extremely brief Solaris source was edited to say "print working directory", and by whom. Maybe it was "Joe down the hall". Who knows? The Solaris man page - http://www.unix.com/man-page/opensolaris/1/pwd/ - does not seem to back your claim. So the Solaris source seems very weak. It's a similar situation with the extremely brief GNU source you mention. Who knows under what circumstance that snippet was written? The GNU man page itself - http://www.unix.com/man-page/linux/1/pwd/ - does not back your claim. So again seems very weak. You say "strongly suggests", but "strongly" seems an exaggeration, "weakly" seems more accurate. Anyway, I'm just speaking from personal experience and knowledge. I was there at the time, writing software and using Unix. "Print" was usually used to mean printing something to paper, using lpr. I would have never thought of pwd as "print" because it doesn't go to the printer. "Present working directory" made perfect sense, to emphasize that the working directory was changing and dynamic, as with the word "current". Not everything in Wikipedia has a source. Certain things are self-obvious to those in a particular field. For me, this is such a case. I know what pwd meant. Why the man pages don't say "present working directory" is a mystery to me. The man page silence does make my case weak. The only source I found is previously argued about linfo.org - http://www.linfo.org/pwd.html - which is admittedly contradictory, says "present" in the title tag, "print" in the text, overall suggests that there is disagreement. But in honesty you would admit that the case for "print working directory" is almost equally weak, as no man page says that. Perhaps there were two camps when the command was first created. Who knows? Maybe different people in different cities interpreted pwd differently. And remember the famous case of the "mutt" command. The people who wrote UNIX were sometimes not the most careful when coming up with names. Perhaps the article should more accurately state that there is disagreement regarding what pwd stands for, and list the two versions. The previous content on this talk page suggests disagreement, linfo.org suggests disagreement, and I suggest disagreement. There are certainly precedents for mentioning alternative interpretations. "PHP" originally meant something different than current. I believe there are different interpretations for "PERL". I'm sure there are many other examples. 174.24.228.1 (talk) 14:26, 14 January 2015 (UTC)Reply
At least "print working directory" was used in some official manuals. Other manuals don't say anything, because this isn't really important. But I've never found a manual saying "present working directory" (in the context of the pwd command). This doesn't imply anything about what it historically meant by the one who invented it. Perhaps this has now been lost. Concerning "print", this is not related to "printing something to paper"; it is just a synonym of "output". See for instance the function "printf" in C (created at the same time as Unix). Vincent Lefèvre (talk) 20:06, 21 January 2015 (UTC)Reply

The UNIX TIME-SHARING SYSTEM: UNIX PROGRAMMER’S MANUAL Seventh Edition, Volume 1 (January, 1979) by Bell labs says:

 NAME pwd – working directory name
 SYNOPSIS pwd
 DESCRIPTION Pwd prints the pathname of the working (current) directory.
 SEE ALSO cd(1)

See article for this and various other UNIX and UNIX-like man pages.

Needless to say, those early UNIX versions really did mean "print", because the Datapoint 2200 glass TTY had not yet replaced the Teleprinter on most systems. --Guy Macon (talk) 04:47, 13 August 2015 (UTC)Reply

Another user just removed a bunch of references (which is fine, the one he kept and expanded on is authoritative) so in case this whole "Pwd isn't an initialism for Print Working Directory" thing comes up again, I am putting the removed references here so we don't have to look things up again.[1][2][3][4][5][6][7][8][9][10]

References

  1. ^ [1], UNIX TIME-SHARING SYSTEM: UNIX PROGRAMMER’S MANUAL Seventh Edition, Volume 1 (January, 1979) by Bell labs, Page 142
  2. ^ [2], POSIX Standard (IEEE Std 1003.1) MAN page
  3. ^ [3], DEC OSF/1 MAN page
  4. ^ [4], Apple OS X MAN page
  5. ^ [5], OpenBSD MAN page
  6. ^ [6], OpenSolaris MAN page
  7. ^ [7], Minux MAN page
  8. ^ [8], Linux MAN page
  9. ^ [9], GNU Coreutils MAN page
  10. ^ [10], Bell Labs Plan 9 MAN page

--Guy Macon (talk) 22:48, 26 April 2016 (UTC)Reply

If you meant the latest changes done by comp.arch, he didn't remove anything. He just fixed the typography (spacing), though Wikipedia's diff output lets one think that the references were removed. But that's just Wikipedia's diff that is poorly written. With a real word diff, the changes are more obvious. Vincent Lefèvre (talk) 00:45, 27 April 2016 (UTC)Reply
My apologies. Off-topic rant: fifty-two million dollars spent last year and we still have a diff that sucks. See User:Guy Macon/Wikipedia has Cancer --Guy Macon (talk) 07:46, 1 February 2017 (UTC)Reply

Multics Precedent edit

Multics, generally regarded as the precedecesor to Unix, had a pwd command, which was the short name of print_wdir command[1][2]. This appears to predate and be the inspiratin for the name of the Unix pwd command. While the Wikipedia entry for ls recognizes that the Unix ls command came from Multics, this page does not similarly recognize the Multics precedent for the pwd command. This Multics pwd/print_wdir equivalence also provides support for pwd meaning "print working directory". I propose that Multics be added to the "Operating System" list in the sidebar and mentioned as the parent implementation in the "Implementation" section.

--Chris Tyler (talk) 04:25, 7 March 2020 (UTC)Reply

Yes, this would be a good idea. Vincent Lefèvre (talk) 11:37, 7 March 2020 (UTC)Reply

References

  1. ^ Van Vleck, Tom. "Unix and Multics". Multicians.org. Retrieved 7 March 2020.
  2. ^ "working_dir, wd, print_wdir, pwd (Multics help segment)". MIT. Retrieved 7 March 2020.