From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 24 15:40:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C106C16A425; Fri, 24 Mar 2006 15:40:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37CD943D49; Fri, 24 Mar 2006 15:40:28 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k2OFeIiY038700; Fri, 24 Mar 2006 10:40:18 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 24 Mar 2006 10:40:58 -0500 User-Agent: KMail/1.9.1 References: <20060324120618.GB17507@submonkey.net> <20060324135528.GA15948@submonkey.net> In-Reply-To: <20060324135528.GA15948@submonkey.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603241041.00233.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1355/Thu Mar 23 16:18:22 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.7 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: hackers@freebsd.org, Ceri Davies Subject: Re: Exposing a file's creation time via find(1) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2006 15:40:28 -0000 On Friday 24 March 2006 08:55, Ceri Davies wrote: > On Fri, Mar 24, 2006 at 12:06:18PM +0000, Ceri Davies wrote: > > > > While perusing my Daemon book I noticed that it mentioned the existence > > of the st_birthtime field in struct stat. I then also noticed that not > > many utilities expose this: the Daemon mentions dump(8), restore(8) and > > the only other one I could find was stat(1). > > > > The attached patch adds st_birthtime related primaries to find(1), being > > -Bmin, -Btime, -Bnewer et al. These let you use an inode's real > > creation time in find primitives. I have chosen 'B' over 'b' to match > > the format specifier from stat(1). It seems to do the right thing on UFS > > 1, 2 and MSDOS file systems, but some more testing would be appreciated. > > Note that there is a line out of place in the manpage diff - this is > corrected in a later version of the patch at > http://people.FreeBSD.org/~ceri/find-Btime.diff Could you add a new flag to ls to use birthtime for -t while you are at it? Good luck finding a flag to use though. :-P -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org