Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2006 12:28:12 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Ceri Davies <ceri@submonkey.net>
Cc:        hackers@freebsd.org
Subject:   Re: Exposing a file's creation time via find(1)
Message-ID:  <200603241228.13826.jhb@freebsd.org>
In-Reply-To: <20060324165059.GC15948@submonkey.net>
References:  <20060324120618.GB17507@submonkey.net> <200603241041.00233.jhb@freebsd.org> <20060324165059.GC15948@submonkey.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 24 March 2006 11:50, Ceri Davies wrote:
> On Fri, Mar 24, 2006 at 10:40:58AM -0500, John Baldwin wrote:
> > 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
> 
> That's the exact reason I didn't do it this round :)
> 
> Andrzej Tobola sent me this patch for ls -U pretty much immediately.

Yeah, I just committed it, so you don't have to worry about that bikeshed.
:)

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603241228.13826.jhb>