求个Linux脚本判断文件修改时间小于等于系统当前时间5分钟输出1,否则输出0

2025-03-10 17:27:50
推荐回答(1个)
回答1:

if [ -z `find /usr/123.txt -mmin -5` ];then
echo 0

else
echo 1

fi