Whamcloud - gitweb
LU-12984 utils: Add -newerXY support for lfs find
In regular "find" it is possible to specify a filename to use
for a relative timestamp:
-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
- c The inode status change time of reference
- m The modification time of the file reference
- t reference is interpreted directly as a time
We should enhance Lustre 'lfs find' to support '-newerXY' options.
In current implementation, When reference is interpreted directly
as a time, it must be in one of the following formats:
- "%Y-%m-%d %H:%M:%S"
- "%Y-%m-%d %H:%M"
- "%Y-%m-%d"
- "%H:%M:%S"
- "%H:%M"
- "@%s"
- "%s"
Otherwise, it will report errors.
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ib006940b231c4a18f892c492dd892f7733b5d8ba
Reviewed-on: https://review.whamcloud.com/36806
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>