Ubuntu - 7z is a compression utility that supports password feature
Why do we need a compression tool
There are many compression utilities in Ubuntu and tar is the most commonly used utility. But, we want a utility program to password protect the compressed file before sending it to another server or let the user download the file.
Here's the component that you need
- 
To install the program, execute the following command: sudo apt-get install p7zip-full
- 
To the compress the files 7z a myZipFile.7z @file-list.txt -xr!temp -pmyPasswordWhere - myZipFile.7zis the output name.
- file-list.txtis a text file that contains the files and directories to be backed up. One file/directory per line.
- -xr!tempis to exclude the 'temp' directory.
- -pargument means password and 'myPassword' is the password to encrypt the file.
 
- 
To test the archive (i.e., the compressed file), execute the following command: 7z t -pmyPassword myZipFile.7z
Related posts
Back to #UBUNTU blog
Back to #blog listing