The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Peter Jeremy <peter@rulingia.com>
To: Abhinav Rajagopalan <abhinavrajagopalan@gmail.com>
Cc: tuhs@tuhs.org
Subject: Re: [TUHS] PDP-7 UNIX filesystem
Date: Wed, 23 Oct 2019 05:07:05 +1100	[thread overview]
Message-ID: <20191022180705.GD51849@server.rulingia.com> (raw)
In-Reply-To: <CANOZ5riWWibJ4OY8SnZ7q_o1VaMRFq_-1yXedq2PMXupc1ckMA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

On 2019-Oct-21 16:13:54 +0530, Abhinav Rajagopalan <abhinavrajagopalan@gmail.com> wrote:
>We should also touch upon the "cd -" as this one takes you back like a back
>button into the directory you were last inside, whereas the cd ../.. takes
>you up or down the hierarchy depending on the placement of the / and adding
>placeholders i.e directory names in place of the .. (dots).

There are two different mechanisms here.  "-" as a "cd" argument is a
relatively recent shell builtin: More modern shells keep track of the
previous working directory ($OLDPWD) and evaluate "cd -" as "cd $OLDPWD",
which will return to the previous working directory (modulo filesystem
changes).  Note that it's a "swap" operation, not a "back" operation:
Repeated "cd -" invocations will swap between two directories, not keep
going back through previous working directorie.  I'm not sure when this
feature was introduced but don't believe it was part of ancient Unix.

OTOH, "cd ../.." just passes "../.." to the kernel as a pathname and the
kernel evaluates it using its normal pathname lookup.  Having it move
up (towards the root of) the filesystem relies on the presence of a ".."
directory entry being the parent directory inode.

>Since you mentioned the word dd, the utility which serves me like none
>other for my frequent rewrites of images, it too has an interesting past,
>it seems like 'dd' was non-unixy in it's design approach, if I'm to believe
>the lores around, which leads me to think that this might have been another
>one of the many idiosyncratic naming conventions used back then. More on
>the dd stuff: http://www.catb.org/jargon/html/D/dd.html

As noted in the jargon file, the dd(1) syntax is deliberately reminiscent
of the DD statement in IBM JCL.  This was presumably a joke and one of the
BTL old-timers on the list may know more of the background.

-- 
Peter Jeremy

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

  parent reply	other threads:[~2019-10-22 18:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21  6:22 Angelo Papenhoff
2019-10-21 10:43 ` Abhinav Rajagopalan
2019-10-21 11:38   ` Abhinav Rajagopalan
2019-10-21 12:00     ` Thomas Paulsen
2019-10-21 13:31       ` Abhinav Rajagopalan
2019-10-22 18:07   ` Peter Jeremy [this message]
2019-10-23  0:07     ` Mary Ann Horton
2019-10-23  2:02       ` Kurt H Maier
2019-10-23  2:19         ` Larry McVoy
2019-10-23  8:34       ` Thomas Paulsen
2019-10-24  0:06         ` Warner Losh
2019-10-24  2:23           ` Michael Parson
2019-10-25 21:08             ` Michael Kjörling
2019-10-25 21:34               ` Arthur Krewat
2019-10-25 21:50                 ` reed
2019-10-25 22:54                 ` Warner Losh
2019-10-24  2:29   ` Christopher Browne
2019-10-24  8:25     ` Thomas Paulsen
2019-10-21 16:54 ` Angelo Papenhoff
2019-10-23  5:48 ` Lars Brinkhoff
2019-10-21 11:58 Noel Chiappa
2019-10-21 15:44 ` Abhinav Rajagopalan
2019-10-22  2:09 ` Jaap Akkerhuis
2019-10-23  2:00   ` Christopher Browne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191022180705.GD51849@server.rulingia.com \
    --to=peter@rulingia.com \
    --cc=abhinavrajagopalan@gmail.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).