bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature proposal/request: find -crtime


From: Eric Blake
Subject: Re: feature proposal/request: find -crtime
Date: Thu, 3 Dec 2015 10:44:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 12/03/2015 07:17 AM, Bozhidar Zhelev wrote:
> Hello All,
> 
> Kudos for this awesome piece of software and many thanks for the support
> and improvements you are providing! :)
> 
> I would want to propose what i think would be very useful feature for FIND
> 
> Can we have argument -crtime, that is similar in behaviour to atime, mtime
> & ctime?

We already support -newerBB for comparing birth times of files, where
that is known.  So such an option should be named -Btime for consistency
(not -crtime).

> Since there is no kernel API to get that info right away 

Then you're using the wrong kernel :)  BSD and Cygwin already provide
birthtime information as part of stat().

Yes, it would be nice for Linux to either enhance stat(), or add xstat()
(there has been a proposal in the past, but so far it hasn't made it
into the tree).

But until Linux makes it easy to get at birthtime, even the existing
-newerBB predicate is hard to implement.  If you would like to patch
gnulib to provide birthtime for Linux software, then multiple software
would benefit (GNU coreutils' stat(1), for example).  Until then,
teaching just findutils how to do a Linux-specific hack to get at
birthtime feels a bit counter-productive, when it would be better to fix
the kernel or at least gnulib to provide the information easily for
everyone to benefit.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]