M
M
Madion2015-03-06 07:13:31
Task Schedulers
Madion, 2015-03-06 07:13:31

How to archive a file using cron?

Command added to cron:

zip /var/www/sites/www/site.ru/upload/archive.zip /var/www/sites/www/site.ru/upload/file.txt

After executing such a command, it is not the file file.txt itself that gets to the root of the archive, but the full path to it. Those. in the archive, this file can be reached as follows:
/var/www/sites/www/site.ru/upload/file.txt
What command can add only the file itself to the root of the archive, without subfolders?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question