【发布时间】:2015-04-06 20:13:39
【问题描述】:
如果目录中的文件早于 1 天,我想从耗材 csv 文件中删除它。
我尝试打印它们以进行测试:
in.txt
1,one
2,two
代码:
INPUT="in.txt"
while IFS=',' read -r id name
do
find tmp/$name -mtime +1 -type f
done < "$INPUT"
此代码抛出错误:
find: bad status-- tmp/one
find: bad status-- tmp/two
谢谢。
【问题讨论】:
-
试试
find tmp -name $name -mtime ...祝你好运。