Date: Fri, 20 Dec 2002 05:51:15 -0800 From: David Schultz <dschultz@uclink.Berkeley.EDU> To: Andrew Cutler <andrew@1stelement.com> Cc: setantae@submonkey.net, freebsd-questions@FreeBSD.ORG Subject: Re: chown broken?? Message-ID: <20021220135115.GA38907@HAL9000.homeunix.com> In-Reply-To: <1040391396.921.43.camel@localhost> References: <1040390551.921.36.camel@localhost> <20021220132634.GA6498@submonkey.net> <1040391396.921.43.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Andrew Cutler <andrew@1stelement.com>: > I realise that now, but why does chown not ignore the match since most > other commands simply return? > . is a directory -- ignored > .. is a directory -- ignored > > This inconsistency is not logical. rm makes a special case for '.' and '..' specifically to avoid this kind of foot-shooting. It gets away with it because it doesn't make much sense to remove your current directory, much less its parent. Unfortunately, you can't really do the same thing for chown because people sometimes do say 'chown -R foo .' and really mean it. Since the '.*' is expanded by the shell, chown has no way of knowing what was really meant. (BTW, the example I gave shows you how to do what you were trying to do, without the problems you ran into.) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021220135115.GA38907>