bugfindutils - Bugs: bug #11668, [wishlist] FreeBSD extensions for...


bug #11668: [wishlist] FreeBSD extensions for time specification.

Submitter:  Andreas Metzler <ametzler>
Submitted:  Thu 20 Jan 2005 09:55:59 PM UTC
Votes:  100  
Category:  find Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Andreas Metzler Open/Closed:  Closed
Release:  None Fixed Release:  4.3.3
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Sun 15 Apr 2007 07:46:45 PM UTC, comment #7: 

Birth time is now also supported on systems (and file systems) supporting it. This change has been made in findutils-4.3.3.  The NEWS file for that release fails to mention this, unfortunately, but bug #17396 is related ans is mentioned.

James Youngman <jay>
Project Administrator
Wed 07 Mar 2007 11:20:54 PM UTC, comment #6: 

This is now implemented in the CVS code for findutils 4.3.x.  The documentation has not yet been updated.  Support for st_birthtime (-newerXY with X or Y = B) has not yet been implemented (the information is missing on most filesystems anyway).

James Youngman <jay>
Project Administrator
Sat 24 Feb 2007 10:25:36 AM UTC, comment #5: 

I had deferred making changes of this type until after implementing support in find for sub-second granularity timestamps, since that would touch substantially the same parts of the code.

As for spelling of the names of tests, it is reasonable to follow existing practice except where there is an obvious reason not to.  So it's likely that we will end up with some tests hich follow the existing FreeBSD practice, even if not all the combinations are supported.

As for "not interested", well, there is always more work than time.  The patch could not simply be applied as-is (for a start, there was no documentation).

James Youngman <jay>
Project Administrator
Fri 23 Feb 2007 10:46:47 AM UTC, comment #4: 

Similar abilities have also been implemented by patch #2653, but apparently the maintainers are not interested.

Mon 21 Nov 2005 11:59:02 AM UTC, comment #3: 

This could be made more useful if get_date were to indicate which time units the datestring specified. It would then be possible to define date equality with regard to these units. If the datestring specified "5 days ago", for example, find might select dates between five and six days ago. On the other hand, if the datestring specified "2001-10-10", it might select dates between 2001-10-10 00:00 and 2001-10-11 00:00.

Michael Burschik <burschik>
Sun 20 Nov 2005 05:45:44 PM UTC, comment #2: 

I added getdate.[chy] from the coreutils to the lib directory and came up with the patch attached. It should implement my own suggestion.

Michael Burschik <burschik>
Thu 10 Nov 2005 11:33:49 AM UTC, comment #1: 

Date and time specifications should conform to the "textual date representations that GNU programs accept" (according to file utils info). This would allow for -atime "5 seconds ago", or -mtime -'2004-12-24', although it might be better to use different option names, such as '-adate'. This would not solve the -newerXY issue, but I would consider it more elegant to use something like -adate -$(get_mtime /some/file), given that get_mtime were a command or shell function that returns the modification time of a file.

Michael Burschik <burschik>
Thu 20 Jan 2005 09:55:59 PM UTC, original submission:  

FreeBSD's find supports a number extensions for specifying time/datee that could be useful:

-atime n[smhdw]

find accepts not only plain numbers but also numbers with units, e.g. -atime -90s, searching for files accessed during the last 90 seconds.

[obviously this also works for -mtime and -ctime]
-newerXY file
     True if the current file has a more recent last access time
     (X=a), change time (X=c), or modification time (X=m) than the
     last access time (Y=a), change time (Y=c), or modification time
     (Y=m) of file.  In addition, if Y=t, then file is instead inter-
     preted as a direct date specification of the form understood by
     cvs(1).  Note that -newermm is equivalent to -newer.

This sounds like featuritis, but the case with Y=t could be useful as it adds the possibility to specify exact dates like -newermt -'2005-12-24' which we are currently missing.

Please see http://www.freebsd.org/cgi/man.cgi?query=find for complete documentation.

Andreas Metzler <ametzler>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #2657:  adate.patch added by burschik (10KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)

    There are 100 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-04-29 jay StatusIn Progress Fixed
    2007-04-15 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3.3
    2007-03-07 jay StatusPostponed In Progress
        Assigned toNone jay
    2007-02-24 jay StatusNone Postponed
    2005-11-20 burschik Attached File- Added adate.patch, #3117
    2005-10-28 ahalsey Carbon-Copy- Added ahalsey
    2005-01-20 ametzler Carbon-Copy- Added wakkowarner

    Back to the top

    Powered by Savane 3.9