Results 1 to 6 of 6
Hey guys I was wondering how would I gzip 7z tar or just regular zip a directory like this /var/Backups/Tones regular gzip won't do it because Tones is a directory ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-03-2012 #1Just Joined!
- Join Date
- Jun 2012
- Posts
- 12
How do I compress a directory?
Hey guys I was wondering how would I gzip 7z tar or just regular zip a directory like this /var/Backups/Tones regular gzip won't do it because Tones is a directory and this site ss64.com/bash doesn't really tell much and I've searched google but what those people are talking about is computer based not mobile and I'd like to also make the archive password protected if its possible!
I've got this my problem is now is that it isn't creating a password for the archive any ideas/suggestions?
Code:#!/bin/bash cd /var/Backups 7z a -p{xd7@9#25ad$k} Tones.tar.7z if 7z q -p{xd7@9#25ad$k} Tones.tar.7z Tones.tar; then * rm Tones.tar fi exit 0Last edited by Death2020; 07-03-2012 at 06:02 PM.
- 07-04-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,680
how about something like this?
Code:cd /var/Backups zip --encrypt Tones.zip Tones/*
- 07-04-2012 #3Just Joined!
- Join Date
- Jun 2012
- Posts
- 12
Is there a way I can create my own password for this that way when it gets archived it already has a set default password?
- 07-05-2012 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,680
- 07-08-2012 #5Just Joined!
- Join Date
- Jun 2012
- Posts
- 12
I know that but I want it to enter the password automatically for when the zip gets created it don't ask the user to create the password
- 07-08-2012 #6Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,680


Reply With Quote

