Date: Tue, 18 Apr 1995 01:32:56 +0800 (CST) From: Brian Tao <taob@gate.sinica.edu.tw> To: FREEBSD-CURRENT-L <freebsd-current@FreeBSD.org> Subject: Behaviour of rm/rmdir Message-ID: <Pine.BSI.3.91.950418012258.3697H-100000@aries.ibms.sinica.edu.tw>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.91.950418012258.3697H-100000>
