The first thing to check when you disagree with a Wikipedia article (like "only serves here to undermine the credibility of the Wikipedia entry") is the "Talk Page" where discussions around the article arises. In this case, there is even an existing discussion around this very subject! The author would do good by participating directly in the editing community, rather than dismissing the article as a whole because of the disagreement.
While the article does end by stating that it doesn't really matter (which is true), I feel like deviated for silly reasons, and ended weird.
Specifically, a lot of the journey was based on the false assumption that manpages will explain abbreviations or naming decisions, and should contain the exact expand form of such deviations - an assumption especially silly for commands as ancient as these, whose names were chosen on a whim by the original authors who were known to be allergic to command names longer than 3 characters.
Finally, despite initial evidence suggesting "pwd" meaning "print working directory", and finally finding rather conclusive evidence for multics documentation showing that "pwd" is an abbreviation of an earlier "print_wdir", the conclusion ends up being "we'll never know for sure".
I don't know about you, but it seems like the author is in denial here.
I had the same reaction. The multics find almost definitively proves it is "print working directory". You'd need a whole heap of other evidence to convince otherwise...
I don't like the abbreviation "pwd" at all, mainly because it looks too much like "password" which is also often abbreviated to "pwd". I prefer "cwd" which would unambiguously mean the Current Working Directory.
Thinking more about that though, "cd" in the shell universally means "change (the current working) directory" but can also possibly mean the "current directory" as well (and DOS/Windows "cd" without arguments does print the current working directory). Note that similar abbreviations like "md" and "rd" are not as universal, as they are "mkdir" and "rmdir" in *nixes (for the good reason).
DOS actually has "chdir" as another name for "cd".
And of course, the POSIX interface for changing and querying the working directory are wonderfully consistently named chdir and getwd (or getcwd, where "c" stands for something).
Anncient Unix also had chdir as the command name for cd. If I'm not mistaken it was changed to cd for v7 with the Bourne shell replacing the previous shell.
Yes when reading the title I thought of <pwd.h> for reading passwd rather than of the command/variable. Also it's already called cwd in other places (like in /proc, at least on Linux) so that would be more consistent.
I really don't follow. The command was named after the multics command print_wdir (print working directory) which had a "pwd" abbreviation already defined. Why would it mean anything other than print working directory?
> Pwd prints the pathname of the working (current) directory.
> I don’t know about you, but this historic document carries more weight for me than other sources I’ve come across, and it only serves here to undermine the credibility of the Wikipedia entry.
This line seems to be the crux of the article and I don't follow at all. I don't see how this undermines the credibility of the Wikipedia entry. What am I missing here?
The manpage says it "PRINTS the pathname of the WORKING (current) DIRECTORY"; I don't see any implication that either the word "print" or "pathname" make up any specific part of the acronym.
Really the manpage doesn't specify either way. If I were to force any meaning from the manpage, I would tend to go with the 1st word in the sentence starting the acronym, but it's not so much ambiguous as it is just simply not saying anything at all.
The original manpage doesn't give an etymology, so should be discarded as a source.
>The manpage says it "PRINTS the pathname of the WORKING (current) DIRECTORY"
You could say the manpage says: "prints the PATHNAME of the WORKING (current) DIRECTORY"
many commands "print" things, doesn't mean it part of the name
>I don't see any implication
How you do not see it? PATHNAME is the only thing that differentiate this command from others, many commands print things ...
It's not simply a set of the words with equal weights. Some words there are more important and define the command, some can be interchanged like : "print" .
You can use "displays", "sends to output" ... but you cannot change "pathname" without ruining the meaning.
Should be obvious, for those who downvote, or simple logic doesn't work for some?
Your argument hinges on interpreting it exactly as YOU read it, while the grandparent argument only requires that multiple readings be possible. As multiple readings are demonstrably possible, your logic shows flaws.
Historical fact is determined by examining sources for how the authors and other contemporary people interpret them, not applying your own snap judgements to them.
Original article talks about MEANINGS of pwd.
To determine meaning YOU imply that MEANING is defined ONLY by looking for historical fact, but it is how YOU interpret it. We can look for historical fact and find out that most of the commands literally printed on PAPER.
So IF we talk about MEANINGs, we can take into account historical fact but there is no much use for it, if it doesn't represent the MEANING!
There are no flaws in my logic. There are flows in your suggestion that we should discuss ONLY historical fact to determine MEANING.
>while the grandparent argument only requires that multiple readings be possible
while it does say about multiple readings possible,
it uses caps used only in "PRINT" word. I merely pointed out to that imbalance by providing alternative, to ballance it back.
Then I went further and argued that multiple readings are inappropriate there, because it is naive to put the same weight to the words. Some words are ESSENTIAL and some can be used for almost any command in unix/linux. Even grandparent argument discarded manual as source. and we simply -do-not-know- historical fact, So I CAN use manual as source of interpretations in search for !MEANING! not historical fact, which is absent and not very useful even if it will be determined.
Yeah, the Multics thing seems pretty definitive for me, it's clearly "print working directory". It also makes sense in context with the other basic UNIX commands: they're almost all actions or active verb phrases in some form. "Change directory", "list files, "touch", "concatenate", etc. It makes sense, because they're all programs you run that does stuff, they're not variables you read. So "pwd" as the active "print working directory" makes a lot more sense than the noun phrase "pathname of working directory", which sounds much more like a variable name, not a command name.
Pathname of working directory isn't redunant.
There are multiple attributes of the working directory like creation time, name, pathname, etc.
Pathname is just one of them.
It is more specific to say "pathname of the working directory", you are right about that.
What I meant was: It is redundant in the sense that the pathname is the identifier of the working directory, and if I ask someone to identify something I will receive in answer an identifier.
I.e. If I were to ask a user at their computer "what is the current working directory?" and "what is the pathname of the current working directory?" I will get the same answer.
It makes sense enough—I also assumed that pwd stood for "present working directory"—but the more that I think about it, "present" and "working" are almost redundant. i.e., by "working directory," I would understand "the directory in which I'm currently working."
It doesn't matter as long as you remember it.
Same goes for less.
What does tar mean, or zip, gzip, unzip, rsync, scp.
Do you care? tar is now a verb and a noun in its own right. If you know what it is and what it does, you know what it means.
When you type pwd you mean please do what pwd does.
Given 'pwd -P' may very well print out a different but equally usable path then it brings to my mind the need for two separate commands:
rwd "relative working directory" (no sym link resolution)
awd "absolute working directory" (sym link resolution)
Also, "pwd -A" where A means ABSOLUTE is easier to remember than "-P" for physical. I never hear anyone talk about physical directories. When people are talking about resolving sym links they talk about absolute versus relative paths. Seems like a good historical research topic to understand why the canonical usage is "physical" that no one uses versus relative/absolute paths that are actually used.
Pathname actually makes a lot more sense when you really think about it.
A print working directory command might be expected to give all sorts of details about the dir path, permissions, access/modify/change dates, contents. If I had to guess I think I might expect it to list the contents, like ls -1 does.
Pathname working directory you would pretty much only ever expect to do exactly what PWD does.
I have always thought of it as "print working directory" but I used the Multics command before I ever used Unix so I brought a bunch of Multics preconceptions with me.
We are arguing about BS because author of the PWD have never dreamed it will be used for anything other then literally "print" on paper.
We are suggesting it was very intellectual choice and thus we should stick to this BS forever, just because 'guru' was using paper instead of display and didn't think about the future.
'Pathname' is the ONLY thing that makes sense and useful.
And you can call it as you wish btw, it doesn't matter.
I was looking that up and found that in UNIX v6 source code, the field name in kernel source code is u_cdir, which stands for "current directory of (user) process":
(P)athname of (W)orking (D)rectory is the ONLY meaningful abbreviation.
It simply cannot be just Print Working Directory
because there are many meaning of this. What to print about current directory exactly? The same goes for present or whatever ..
Manual states it precisely too about PATHNAME. Many commands print things, most of them do this ,
but we do not have pfind pgrep pls pcat etc ...
I got the totally opposite take away from the article. It should be “pathname of working directory” but the Multics history pretty clearly points at “print working directory.”
Some commands become embedded so deep in your muscle memory that you’re going to bring them along with you, even if it occurs to you that the name doesn’t make much sense in the present working environment.
We are arguing about BS because author have never dreamed it will be used for anything other then literally "print" on paper.
We are suggesting it was very intellectual choice and thus we should stick to this BS forever, just because 'guru' was using paper instead of display and didn't think about the future.
find, globally search regex and print, list, concatenate, change directory, make directory etc. are all commands. They all have some kind of imperative verb in there, so "print" fits that pattern.
If I am not mistaken command sends to stdout which can be anything, so print doesn't fit there at all, while pathname still does. Print is used in a sence of some output, like all commands do. Functionality though is difined by WHAT it actually sends to the output, just as with other commands.
It happens that the p in pwd actually does historically mean print from multics, but honestly I just do not care about that, let the p mean whatever you want. My inner monologue will always be "present working directory" even though I think that option is totally silly, my brain is stuck with it now.
I just thought I was offering an interesting fact about where "grep" comes from.
https://en.wikipedia.org/wiki/Talk:Pwd#PWD_meaning.