永久黄网站色视频免费直播,yy6080三理论日本中文,亚洲无码免费在线观看视频,欧美日韩精品一区二区在线播放

Board logo

標(biāo)題: [求助] 遇到一個(gè)很奇怪的問題:命令在.sh文件中執(zhí)行報(bào)錯(cuò)! [打印本頁(yè)]

作者: gump    時(shí)間: 2019-6-6 15:43     標(biāo)題: 遇到一個(gè)很奇怪的問題:命令在.sh文件中執(zhí)行報(bào)錯(cuò)!

  1. /bin/find /www/wdlinux/apache/logs/access*log* -mtime +10 -exec rm -rf {} \;
復(fù)制代碼

以上這條命令在shell中直接執(zhí)行并沒有問題,但是把它放到auto-del-apache_log.sh文件中,再通過
  1. sh -x auto-del-apache_log.sh
復(fù)制代碼

在shell中執(zhí)行結(jié)果報(bào)錯(cuò):
  1. + /bin/find /www/wdlinux/apache/logs/access_log-20190520 /www/wdlinux/apache/logs/access_log-20190521 /www/wdlinux/apache/logs/access_log-20190522 /www/wdlinux/apache/logs/access_log-20190523 /www/wdlinux/apache/logs/access_log-20190524 /www/wdlinux/apache/logs/access_log-20190525 /www/wdlinux/apache/logs/access_log-20190526 /www/wdlinux/apache/logs/access_log-20190527 /www/wdlinux/apache/logs/access_log-20190528 /www/wdlinux/apache/logs/access_log-20190529 /www/wdlinux/apache/logs/access_log-20190530 /www/wdlinux/apache/logs/access_log-20190531 /www/wdlinux/apache/logs/access_log-20190601 /www/wdlinux/apache/logs/access_log-20190602 /www/wdlinux/apache/logs/access_log-20190603 /www/wdlinux/apache/logs/access_log-20190604 'www/wdlinux/apache/logs/access_log-20190605 /www/wdlinux/apache/logs/access_log-20190606 -mtime +10 -exec rm -rf '{}' ';
  2. /bin/find: missing argument to `-exec'
復(fù)制代碼


請(qǐng)問是何原因呢?
作者: admin    時(shí)間: 2019-6-26 09:51

不要加-x試試




歡迎光臨 WDlinux官方論壇 (http://www.fsowen.com/bbs/) Powered by Discuz! 7.2