From owner-freebsd-current Mon Apr 17 10:32:44 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA09363 for current-outgoing; Mon, 17 Apr 1995 10:32:44 -0700 Received: from aries.ibms.sinica.edu.tw ([140.109.40.248]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id KAA09351 for ; Mon, 17 Apr 1995 10:32:40 -0700 Received: (from taob@localhost) by aries.ibms.sinica.edu.tw (8.6.11/8.6.9) id BAA04114; Tue, 18 Apr 1995 01:32:57 +0800 Date: Tue, 18 Apr 1995 01:32:56 +0800 (CST) From: Brian Tao To: FREEBSD-CURRENT-L Subject: Behaviour of rm/rmdir Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: current-owner@FreeBSD.org Precedence: bulk This is something that has been bothering me for years... dunno why I suddenly decide to bring it up now. ;-) Why do "rm -r[f]" and "rmdir" complain about removing an empty directory if you append a slash to the name? I mean, this looks pretty ridiculous to me: % du testdir 2371 testdir % rm -rf testdir/ rm: testdir/: Is a directory <--- tell me something I don't know... % rmdir testdir/ rmdir: testdir/: Is a directory <--- argh!!! It isn't a big deal to leave off the trailing slash, but filename completion in tcsh and bash both append it. Is this just a 4.4BSD thing? I checked around on our IRIX, SunOS, Solaris and AIX machines and none exhibit this behaviour. BSD/OS 2.0 rm/rmdir behave this way too. Bug or feature? -- Brian ("Though this be madness, yet there is method in't") Tao taob@gate.sinica.edu.tw <-- work ........ play --> taob@io.org