bug-findutils
[Top][All Lists]
Advanced

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

Re: How to find by birth time?


From: Peng Yu
Subject: Re: How to find by birth time?
Date: Sun, 20 Nov 2011 15:05:50 -0600

> Yes.  It's explained in the Texinfo documentation for find.

I see the word 'birth' appears in the following two places.

       -newerXY reference
              Compares the timestamp of the current file with reference.   The
              reference  argument  is  normally the name of a file (and one of
              its timestamps is used for the comparison) but it may also be  a
              string  describing  an  absolute time.  X and Y are placeholders
              for other letters, and these letters select which time belonging
              to how reference is used for the comparison.

              a   The access time of the file reference
              B   The birth time of the file reference
              c   The inode status change time of reference
              m   The modification time of the file reference
              t   reference is interpreted directly as a time

              Some  combinations are invalid; for example, it is invalid for X
              to be t.  Some combinations are not implemented on all  systems;
              for example B is not supported on all systems.  If an invalid or
              unsupported combination  of  XY  is  specified,  a  fatal  error
              results.   Time  specifications are interpreted as for the argu-
              ment to the -d option of GNU date.  If you try to use the  birth
              time  of  a  reference file, and the birth time cannot be deter-
              mined, a fatal error message results.  If  you  specify  a  test
              which  refers  to  the  birth time of files being examined, this
              test will fail for any files where the birth time is unknown.


     All the single character options except -H and -L as well as -amin,
     -anewer, -cmin, -cnewer, -delete, -empty, -fstype, -iname, -inum,
     -iregex, -ls, -maxdepth, -mindepth, -mmin, -path, -print0, -regex and all
     of the -B* birthtime related primaries are extensions to IEEE Std
     1003.1-2001 (``POSIX.1'').


Since it say "-B* birthtime ...", I guess that these are related to
birth time. But none of the following item explicitly says "birth". It
seems to me that "file's inode creation" is the same as "birth". If
so, I think that the info should be more explicit about this, as birth
time have been used in other places like man stat.

Also, how come 'man find' even doesn't mention -Btime?


     -Bmin n
             True if the difference between the time of a file's inode cre-
             ation and the time find was started, rounded up to the next full
             minute, is n minutes.

     -Bnewer file
             Same as -newerBm.

     -Btime n[smhdw]
             If no units are specified, this primary evaluates to true if the
             difference between the time of a file's inode creation and the
             time find was started, rounded up to the next full 24-hour
             period, is n 24-hour periods.

             If units are specified, this primary evaluates to true if the
             difference between the time of a file's inode creation and the
             time find was started is exactly n units.  Please refer to the
             -atime primary description for information on supported time
             units.


BTW, I'm not sure the version of the info and man page of find. But I
have the following version of find.

~$  find --version
find (GNU findutils) 4.4.2


-- 
Regards,
Peng



reply via email to

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