executeCommand.sh 453 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. #project_path=/var/www/testwas
  3. update_path=/var/www/update
  4. #重启队列
  5. #sudo bash runServes.sh
  6. #进入项目目录
  7. cd $1
  8. #将项目文件中3分钟之前改动的文件存到update文件
  9. find -mmin -3 |xargs -I {} cp {} -u -t $update_path
  10. for file in `ls $update_path`
  11. do
  12. if test -f $file
  13. then
  14. echo "file: $file"
  15. elif test -d $file
  16. then
  17. echo "path: $file"
  18. fi
  19. done