From owner-freebsd-hackers Wed Apr 10 7:21:54 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 96D4337B419 for ; Wed, 10 Apr 2002 07:21:48 -0700 (PDT) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 8F82D5309; Wed, 10 Apr 2002 16:21:46 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bogdan TARU Cc: Subject: Re: 'rm' incompatibility with Posix.2 References: <20020410091302.Y79904-200000@fw.cgn.icom> From: Dag-Erling Smorgrav Date: 10 Apr 2002 16:21:45 +0200 In-Reply-To: <20020410091302.Y79904-200000@fw.cgn.icom> Message-ID: Lines: 37 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 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 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. 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