Exposing a file's creation time via find(1)
Ceri Davies
ceri at submonkey.net
Fri Mar 24 13:55:30 UTC 2006
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
Ceri
--
That must be wonderful! I don't understand it at all.
-- Moliere
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060324/ebff463c/attachment.pgp
More information about the freebsd-hackers
mailing list