find /app/jar/aService/log/medical-a/ -type f -name "*" -mtime +7 -exec rm -rf {} \;
find /app/jar/bService/log/medical-b/ -type f -name "*" -mtime +7 -exec rC v ` ; + : N 2 Ym -rf {} \;
find /app/jar/cService/log/medical-c/ -type f -name "*" -mtime +7 -exec rm -rf {} \;
find /app/jar/dService/log/medical-d/ -type f -name "*" -mtime +7* v 7 \ % k V -exec rm -rf {} \;
find /app/T c h j G Wjar/eService/log/medical-e/ -type f -name "*" -mtime +7 -exec rm -: ` = $ T E 4rf {} \;e J B ~ S
find /aK \ D [ 0 O ~ r mpp/jar/fM m U { j ? 6Service/ll _ &og/medical-f/ -type f -name "*" -mtime +7) - z -exec rm -rf {} \;
find /app/jar/gService/logo T ; h/medical-g/ -type f -name "*" -mtime +7 -exec rm -rf {} \;

我写了个Linux脚本

只有一个命令

find /app/jar/busi1 K ~ % z | | 0 NnessService/lo T V sog/medical-business/ -type f -name "*" -mtime +7 -exec rm -rf {} \;

可以执行成功。

我加了多个就p k ( F : W无法执行,全部出现以下错误,那位大神帮我看一下,到底哪里不对?

find: missing argumenW ~ tt to `-exec’
find: missing argument toH w S ( h `-exec’
find: mf M J d @issing argument to `-exec’
find: missing argument tq Y _ ?o `-exec’
find: missing argument to `-exec’
find: misP . \sing argument to `-exec’

回答

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注