From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9216 invoked from network); 29 Dec 2021 17:15:01 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 29 Dec 2021 17:15:01 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id C7BB19CFDC; Thu, 30 Dec 2021 03:14:58 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id A95809CED2; Thu, 30 Dec 2021 03:14:49 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id E15069CED2; Thu, 30 Dec 2021 03:14:48 +1000 (AEST) Received: from freefriends.org (freefriends.org [96.88.95.60]) by minnie.tuhs.org (Postfix) with ESMTPS id 689509CEA9 for ; Thu, 30 Dec 2021 03:14:48 +1000 (AEST) X-Envelope-From: arnold@skeeve.com Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 1BTHEjwb008224 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Dec 2021 10:14:45 -0700 Received: (from arnold@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 1BTHEiXo008223; Wed, 29 Dec 2021 10:14:44 -0700 From: arnold@skeeve.com Message-Id: <202112291714.1BTHEiXo008223@freefriends.org> X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to arnold@skeeve.com using -f Date: Wed, 29 Dec 2021 10:14:44 -0700 To: clemc@ccc.com, bakul@iitbombay.org References: In-Reply-To: User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [TUHS] moving directories in svr2 X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@minnie.tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Bakul Shah wrote: >  > On Dec 29, 2021, at 8:01 AM, Bakul Shah wrote: > > On Dec 29, 2021, at 7:18 AM, Clem Cole wrote: > >> > >> Think about the UNIX FS and the link system call. How is mv implemented? You link the file to the new directory and the unlink it from the old one. But a directory file can not be in two directories at the same time as the .. link would fail. > > > > Don’t see why linking a dir in two places is a problem. > > To expand on this a bit, the “cd ..” case can be handled by not storing a .. > link in a dir. in the first place! Store the $PWD path in the u struct. Then > cd .. would simply lop off the last component, if one exists. Thus .. takes > you back only on the path you used! This also takes care of the issue with > symlinks (& does what csh did in user code). Plan 9 eventually did something like this. I don't remember the details. Arnold