find 查找指定时间文件

find /usr/ -newermt ‘2017-05-07’ ! -newermt ‘2017-05-08’

在/usr/下查找2017-05-07-2017-05-08的文件

!/bin/bash

for file in /*; do
if [ $file == “/opt” -o $file == “/proc” -o $file == “/run” -o $file == “/s ] ;then
continue
fi
echo ###########$file############
find $file -newermt ‘2017-05-07’ ! -newermt ‘2017-05-08’
echo ###########################
echo
done

猜你喜欢

转载自blog.csdn.net/wdjjwb/article/details/77532393