8

Linux脚步问题

 3 years ago
source link: https://www.oschina.net/question/3748069_2322392
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Linux脚步问题

小伯恩 发布于 前天 15:36
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 rm -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 -exec rm -rf {} \;
find /app/jar/eService/log/medical-e/ -type f -name "*" -mtime +7 -exec rm -rf {} \;
find /app/jar/fService/log/medical-f/ -type f -name "*" -mtime +7 -exec rm -rf {} \;
find /app/jar/gService/log/medical-g/ -type f -name "*" -mtime +7 -exec rm -rf {} \;

我写了个Linux脚本

只有一个命令

find /app/jar/businessService/log/medical-business/ -type f -name "*" -mtime +7 -exec rm -rf {} \;

可以执行成功。

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

find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK