From owner-freebsd-questions@FreeBSD.ORG Sat Aug 28 04:08:23 2010 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 C4E2D10656AE for ; Sat, 28 Aug 2010 04:08:23 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id 70CC88FC0A for ; Sat, 28 Aug 2010 04:08:23 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o7S48JwL075490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 27 Aug 2010 23:08:20 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.4) with ESMTP id o7S48JOU065547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 27 Aug 2010 23:08:19 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.3/Submit) id o7S3pmpD018963; Fri, 27 Aug 2010 22:51:48 -0500 (CDT) (envelope-from dan) Date: Fri, 27 Aug 2010 22:51:47 -0500 From: Dan Nelson To: Robert Bonomi Message-ID: <20100828035147.GA5913@dan.emsphone.com> References: <201008280231.o7S2V1c5008994@mail.r-bonomi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201008280231.o7S2V1c5008994@mail.r-bonomi.com> X-OS: FreeBSD 8.1-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.96 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Fri, 27 Aug 2010 23:08:20 -0500 (CDT) Cc: kamikaze@bsdforen.de, freebsd-questions@freebsd.org Subject: Re: change file creation time on msdosfs 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: Sat, 28 Aug 2010 04:08:23 -0000 In the last episode (Aug 27), Robert Bonomi said: > > From owner-freebsd-questions@freebsd.org Thu Aug 26 14:33:04 2010 > > Date: Thu, 26 Aug 2010 21:06:04 +0200 > > From: Dominic Fandrey > > To: freebsd-questions@freebsd.org > > Subject: change file creation time on msdosfs > > > > I need to change the file creation time of some files on an msdosfs file > > system. > > > > Is there any other way to do this than copying the file and deleting the > > original? > > There are _always_ alternative ways. With suffficient knowledge, oue > could, for example, use 'dd' to copy the required two bytes to the > appropriate position on the raw device holding the filesystem. This > approach is, however, not likely to be at all 'reasonable' for the average > user. > > > The usual suspects like touch and mv do not work. > > yup. 'creation' timestamp is intended to be more-or-less immutable in the > Unix world. And that 'viewpoint' carries over to other kinds of > filesysems grafted onto a Unix host. No; the utimes() syscall can be used to easily set the creation time (called birth time so it doesn't get confused with the "ctime" file metadata change time). More likely is that whoever added birthtime to ufs didn't bother updating the msdosfs code. If one of the other BSD's has implemented it, it should be relatively easy to import the changes. Otherwise you'll probably have to look at how birthtime is currently handled in ufs, and make it work in msdosfs. -- Dan Nelson dnelson@allantgroup.com