From owner-freebsd-questions@FreeBSD.ORG Fri Feb 8 11:54:07 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E50C416A420 for ; Fri, 8 Feb 2008 11:54:07 +0000 (UTC) (envelope-from wouter@fizzyflux.nl) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.189]) by mx1.freebsd.org (Postfix) with ESMTP id C461B13C4E1 for ; Fri, 8 Feb 2008 11:54:07 +0000 (UTC) (envelope-from wouter@fizzyflux.nl) Received: by rv-out-0910.google.com with SMTP id g13so2791121rvb.43 for ; Fri, 08 Feb 2008 03:54:07 -0800 (PST) Received: by 10.140.147.18 with SMTP id u18mr3139362rvd.202.1202471647010; Fri, 08 Feb 2008 03:54:07 -0800 (PST) Received: by 10.141.179.16 with HTTP; Fri, 8 Feb 2008 03:54:06 -0800 (PST) Message-ID: Date: Fri, 8 Feb 2008 12:54:06 +0100 From: "Wouter Oosterveld" To: freebsd-questions@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47AC2018.6010403@gahr.ch> <47AC3D71.4060409@gahr.ch> Subject: rename and chmod (was: cp -p) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 11:54:08 -0000 > >> Now, from a logical point of view, why moving a file into a directory > > doesn't fall into the "created into them" case? > > > > Because (if on the same filesystem) you don't create a new file. You > > just link the file in the destination dir and unlink the file from the > > source dir. > > Exactly. But from a /*logical*/ point of view, shouldn't this case be > treated /*as if*/ the file was created inside the target directory? No. This has nothing to do with logics but with your premisses, the implementation of mv and standards (IEEE Std 1003.2 (``POSIX.2'')). It just behaves different than you would expect, but that is no logical error. > > Regards, > > > > Wouter > > > -- > Pietro Cerutti > > PGP Public Key: > http://gahr.ch/pgp > > > -- [ wouter@berenboot.xs4all.nl is binnenkort niet meer, wouter@fizzyflux.nl is mijn nieuwe email-adres. ] -- [ wouter@berenboot.xs4all.nl is binnenkort niet meer, wouter@fizzyflux.nl is mijn nieuwe email-adres. ]