Installation 7z 7z commands and command and command 7z 7z mounted under the command of [Posts] using linux use linux

Installation 7z 7z commands and command using the linux

HTTPS: // www.cnblogs.com/yiwd/p/3649094.html 

yum p7zip the install

execution command or 7za a 7za x

a : Add files to archive
b : Benchmark
d : Delete files from archive
e : Extract files from archive (without using directory names)
h : Calculate hash values for files
i : Show information about supported formats
l : List contents of archive
rn : Rename files in archive
t : Test integrity of archive
u : Update files to archive
x : eXtract files with full paths

 

 

 

This paper describes a method of mounting 7z command at linux, also introduced using 7z command. 7z compression format has many advantages, with a high compression ratio, if you do not know, see this article: 7z format, LZMA compression algorithm details and 7-Zip .

Reille Linux distributions using ubuntu, while it has been verified on Redhat, can be used normally.

1. linux installation command 7z

7z command linux mounting in two ways: online installation and installation package, the following were introduced.

1.1 line installation

If your Linux host can be connected to external networks, it is recommended this way, convenient and simple, execute the command:

sudo apt-get install p7zip

7z command line to install.

1.2 installation package

7Z (exact point that is 7-Zip) is provided a program installation package in line, may be installed own translation. This is about using 7z bin bag provided by the installation.

Host linux is generally X86, and 7z bin provides precompiled package can be easily installed. Proceed as follows:

1) go to the website http://sourceforge.net/projects/p7zip/files/ or http://sourceforge.net/projects/p7zip/files/p7zip/ download p7zip packages on the current latest version is 9.20.1;

2) to find the corresponding version number into account, the page will offer two for you to download, it is a bin bag, the other is the source package, here are under the bin bag to 9.20.1, for example, download the package name is: p7zip_9. 20.1_x86_linux_bin.tar.bz2;

3) Execute the following command on Linux (unzip and install):

tar xjvf p7zip_9.20.1_x86_linux_bin.tar.bz2

cd p7zip_9.20.1

sh install.sh

Note that the above command authority, requires root privileges, it is best to add sudo in front of tar and sh command.

This, installation is complete.

2. 7z use the command
2.1 decompress 7z file
7za x phpMyAdmin-3.3.8.1-all-languages.7z -r -o./

Definition:

x represents the decompressed file, and is based on the original directory tree decompression (there is also a parameter e unzip the file, but it will unzip all the files to the root, rather than their original folder)

phpMyAdmin-3.3.8.1-all-languages.7z is a compressed file, where I used to do phpadmin test. Here default phpMyAdmin-3.3.8.1-all-languages.7z in the current directory

-r recursive solution expressed compress all subfolders

-o is specified extract to a directory, after -o is no space, direct access directory. It is important to note.

2.2 compressed file / folder

7za a -t7z -r Mytest.7z /opt/phpMyAdmin-3.3.8.1-all-languages/*

Definition:
A representative of adding files / folders to archive

-t is specified compression type, here as 7z, may designate, as 7za default compression type is 7z.

-r represent all subfolders recursively

Mytest.7z is the name of the compressed archive good

/opt/phpMyAdmin-3.3.8.1-all-languages/*: compressed target.

Note: 7za not support .7z compression format also supports compression and other types of .tar.bz2. As described above, can be specified by -t.

 

Turn http://www.cnblogs.com/mchina/archive/2013/03/08/2934473.html

This paper describes a method of mounting 7z command at linux, also introduced using 7z command. 7z compression format has many advantages, with a high compression ratio, if you do not know, see this article: 7z format, LZMA compression algorithm details and 7-Zip .

Reille Linux distributions using ubuntu, while it has been verified on Redhat, can be used normally.

1. linux installation command 7z

7z command linux mounting in two ways: online installation and installation package, the following were introduced.

1.1 line installation

If your Linux host can be connected to external networks, it is recommended this way, convenient and simple, execute the command:

sudo apt-get install p7zip

7z command line to install.

1.2 installation package

7Z (exact point that is 7-Zip) is provided a program installation package in line, may be installed own translation. This is about using 7z bin bag provided by the installation.

Host linux is generally X86, and 7z bin provides precompiled package can be easily installed. Proceed as follows:

1) go to the website http://sourceforge.net/projects/p7zip/files/ or http://sourceforge.net/projects/p7zip/files/p7zip/ download p7zip packages on the current latest version is 9.20.1;

2) to find the corresponding version number into account, the page will offer two for you to download, it is a bin bag, the other is the source package, here are under the bin bag to 9.20.1, for example, download the package name is: p7zip_9. 20.1_x86_linux_bin.tar.bz2;

3) Execute the following command on Linux (unzip and install):

tar xjvf p7zip_9.20.1_x86_linux_bin.tar.bz2

cd p7zip_9.20.1

sh install.sh

Note that the above command authority, requires root privileges, it is best to add sudo in front of tar and sh command.

This, installation is complete.

2. 7z use the command
2.1 decompress 7z file
7za x phpMyAdmin-3.3.8.1-all-languages.7z -r -o./

Definition:

x represents the decompressed file, and is based on the original directory tree decompression (there is also a parameter e unzip the file, but it will unzip all the files to the root, rather than their original folder)

phpMyAdmin-3.3.8.1-all-languages.7z is a compressed file, where I used to do phpadmin test. Here default phpMyAdmin-3.3.8.1-all-languages.7z in the current directory

-r recursive solution expressed compress all subfolders

-o is specified extract to a directory, after -o is no space, direct access directory. It is important to note.

2.2 compressed file / folder

7za a -t7z -r Mytest.7z /opt/phpMyAdmin-3.3.8.1-all-languages/*

Definition:
A representative of adding files / folders to archive

-t is specified compression type, here as 7z, may designate, as 7za default compression type is 7z.

-r represent all subfolders recursively

Mytest.7z is the name of the compressed archive good

/opt/phpMyAdmin-3.3.8.1-all-languages/*: compressed target.

Note: 7za not support .7z compression format also supports compression and other types of .tar.bz2. As described above, can be specified by -t.

 

Turn http://www.cnblogs.com/mchina/archive/2013/03/08/2934473.html

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/11933922.html