I want to zip with 7zip a folder to specific destination. There is in manual a guide to use -o{folder} but how does it really work?


7z a -t7z backup1 /home/example/folder -o/home/backups/folder1

How to use that -o ? Destination folder exists.


As per the manual, the -o (set Output directory) switch

Specifies a destination directory where files are to be extracted.
This switch can be used only with extraction commands.

When archiving you can simply do something like this:

7z a /path/to/archives/archive.7z /path/to/source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.