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 0