当前位置: 技术问答>linux和unix
AIX 5L , 要删除3天以前的文件
来源: 互联网 发布时间:2015-07-10
本文导语: 我用AIX 5L , 要删除3天以前的文件 执行下面的命令怎么出错? # find sjournal -ctime +17 -print sjournal/20040625.001 sjournal/20040626.001 sjournal/20040627.001 sjournal/20040628.001 # find sjournal -ctime +18 -print sjournal/20040625.001 sjournal/200...
我用AIX 5L , 要删除3天以前的文件
执行下面的命令怎么出错?
# find sjournal -ctime +17 -print
sjournal/20040625.001
sjournal/20040626.001
sjournal/20040627.001
sjournal/20040628.001
# find sjournal -ctime +18 -print
sjournal/20040625.001
sjournal/20040626.001
sjournal/20040627.001
# find sjournal -ctime +19 -print
sjournal/20040625.001
sjournal/20040626.001
# find sjournal -ctime +19 -exec rm
find: 0652-018 An expression term lacks a required parameter.
# find sjournal -ctime +19 -exec rm -f {}
find: 0652-018 An expression term lacks a required parameter.
# find sjournal -ctime +19 -exec rm {}
find: 0652-018 An expression term lacks a required parameter.
#
# find sjournal -ctime +19 -exec rm {}
find: 0652-018 An expression term lacks a required parameter.
请高手指教
执行下面的命令怎么出错?
# find sjournal -ctime +17 -print
sjournal/20040625.001
sjournal/20040626.001
sjournal/20040627.001
sjournal/20040628.001
# find sjournal -ctime +18 -print
sjournal/20040625.001
sjournal/20040626.001
sjournal/20040627.001
# find sjournal -ctime +19 -print
sjournal/20040625.001
sjournal/20040626.001
# find sjournal -ctime +19 -exec rm
find: 0652-018 An expression term lacks a required parameter.
# find sjournal -ctime +19 -exec rm -f {}
find: 0652-018 An expression term lacks a required parameter.
# find sjournal -ctime +19 -exec rm {}
find: 0652-018 An expression term lacks a required parameter.
#
# find sjournal -ctime +19 -exec rm {}
find: 0652-018 An expression term lacks a required parameter.
请高手指教
|
# rm -f `find sjournal -ctime 19`
注意 引号是` 不是'
注意 引号是` 不是'
|
find sjournal -ctime +19 -exec rm {} ;
|
还是用find sjournal -ctime +19 -exec rm -rf {} ;痛快点