From owner-freebsd-hackers Wed Apr 10 7:25:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from icomag.de (ns.icomag.de [195.227.115.162]) by hub.freebsd.org (Postfix) with ESMTP id 3833837B416 for ; Wed, 10 Apr 2002 07:25:26 -0700 (PDT) Received: from localhost (bgd@localhost) by icomag.de (8.11.3/8.11.3) with ESMTP id g3AENYE82520; Wed, 10 Apr 2002 16:23:34 +0200 (CEST) (envelope-from bgd@icomag.de) Date: Wed, 10 Apr 2002 16:23:34 +0200 (CEST) From: Bogdan TARU X-X-Sender: To: Dag-Erling Smorgrav Cc: Subject: Re: 'rm' incompatibility with Posix.2 In-Reply-To: Message-ID: <20020410162300.N79910-100000@fw.cgn.icom> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 10 Apr 2002, Dag-Erling Smorgrav wrote: > Bogdan TARU writes: > > I have attached a patch for the 'rm' untility, which strips the trailing > > slash(es) from the path (according to Posix.2). But I think there are many > > other utilities which need to be patched (e.g. cp, mv). > > Please don't. This functionality is extremely useful. Consider this: > > des@des ~% mkdir foo > des@des ~% touch foo/bar > des@des ~% ln -s foo baz > des@des ~% ls -l baz > lrwxr-xr-x 1 des des 3 Apr 10 16:15 baz -> foo > des@des ~% ls -l baz/ > total 0 > -rw-r--r-- 1 des des 0 Apr 10 16:15 bar > > and the same scenario on Solaris: > > des@sex ~% mkdir foo > des@sex ~% touch foo/bar > des@sex ~% ln -s foo baz > des@sex ~% ls -l baz > lrwxrwxrwx 1 des des 3 Apr 10 16:16 baz -> foo/ > des@sex ~% ls -l baz/ > lrwxrwxrwx 1 des des 3 Apr 10 16:16 baz/ -> foo/ > [scream and curse] > des@sex ~% cd baz > des@sex ~/baz% ls -l > total 0 > -rw------- 1 des des 0 Apr 10 16:16 bar > > In my humble opinion, Solaris (and every other *nix) is broken in this > respect, and *BSD is correct. Except for OpenBDS. No NetBDS machine available, maybe some of you could try it on one as well? bogdan > > DES > -- > Dag-Erling Smorgrav - des@ofug.org > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message