Specify Destination Directory for zip Command Output

0 votes

The zip command generally places the output zip file in the current directory. But, I'm wondering if there is an option that I'm overlooking in the man page that lets me specify the destination directory for the output archive file.

This created 'my_archive' in the current directory:

zip -rT my_archive dir_to_be_archived

But, I want to be able to place 'my_archive' under ./my_backups without having to 'cd' into that backups directory. Is there something like:

zip -rt my_archive dir_to_be_archived --destination ./my_backups

May 10, 2022 in Linux Administration by Edureka
• 13,690 points

edited 4 days ago 93 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP