服务器中的 Cron 命令压缩文件夹并排除其他文件夹?
Cron command in server to Zip a folder and exclude other?
我在我的网站托管中创建了一个 cron 任务。我使用这个命令:
zip -r public_html.zip public_html -x *public_html/cache/smarty*
如您所见,我正在尝试压缩 public_html,但不包括文件夹:public_html/cache/smarty
zip 已创建,但我无法排除文件夹。
我在这里错过了什么?
试试这个:
zip -r public_html.zip public_html -x *cache/smarty/*
我在我的网站托管中创建了一个 cron 任务。我使用这个命令:
zip -r public_html.zip public_html -x *public_html/cache/smarty*
如您所见,我正在尝试压缩 public_html,但不包括文件夹:public_html/cache/smarty
zip 已创建,但我无法排除文件夹。
我在这里错过了什么?
试试这个:
zip -r public_html.zip public_html -x *cache/smarty/*