uutils / findutils

Rust implementation of findutils
MIT License
280 stars 35 forks source link

Implement `-daystart` #372

Open hanbings opened 1 month ago

hanbings commented 1 month ago

refer: https://www.gnu.org/software/findutils/manual/html_node/find_html/Age-Ranges.html

Option: -daystart
Measure times from the beginning of today rather than from 24 hours ago. 
So, to list the regular files in your home directory that were modified yesterday, do

find ~/ -daystart -type f -mtime 1

The ‘-daystart’ option is unlike most other options in that it has an effect 
on the way that other tests are performed. 
The affected tests are ‘-amin’, ‘-cmin’, ‘-mmin’, ‘-atime’, ‘-ctime’ and ‘-mtime’. 
The ‘-daystart’ option only affects the behaviour of any tests which 
appear after it on the command line.