您可以使用 find 来搜索时间范围,但这是一种解决方法。
创建两个临时文件,例如 temp1、temp2
touch --date 'yyyy-mm-dd' temp1
touch --date 'yyyy-mm-dd' temp2
这会将这些文件的时间戳更改为您设置的任何内容。然后使用 find 和这些文件作为范围:
find /some/dir/ -newer temp1 -not -newer temp2
请注意,您的搜索将返回比 temp1 新但不包括 temp1 的日期和比 temp2 更早的日期。