Title here
Summary here
7zip is a great open source tool for compressing files in to an archive, I use it all the time.
Before you can use 7zip, you need to install it on your Linux system. You can do this by running the following command:
sudo apt-get install p7zip-full
To add the current folder to an archive, you can use the following command:
7z a -r archive.7z.
Here:
7z
is the command to invoke 7zipa
is the command to add files to an archive-r
is the option to recurse into subdirectoriesarchive.7z
is the name of the archive file.
refers to the current directoryCaution
7z will backup symlinks but not resolve them
To extract an archive to the current folder, you can use the following command:
7z x archive.7z
Here:
7z
is the command to invoke 7zipx
is the command to extract files from an archivearchive.7z
is the name of the archive file-t7z
option and the -m0=lzma2
option:7z a -t7z -m0=lzma2 archive.7z.
-p
option:7z a -p archive.7z.
You will be prompted to enter a password.
l
command:7z l archive.7z
t
command:7z t archive.7z
u
command:7z u archive.7z.
This will update the archive with the current contents of the directory.
Note: You can use the --help
option with any 7zip command to view more detailed help and options. For example:
7z --help