Ubuntu under the Extract File command Daquan

Source: Internet
Author: User
Tags bz2 pack rar unpack

Ubuntu below RAR Decompression Tool installation method:

Compression function

Install sudo apt-get install rar
Uninstall sudo apt-get remove rar

Decompression function

Install sudo apt-get install Unrar
Uninstall sudo apt-get remove Unrar

Ubuntu below RAR Extract tool command detailed:

Usage: RAR < command >-< options 1> ....-< options n> < operations documentation > < file ...> <@ file list ...> < decompression path >

The RAR command usually consists of a main command plus a number of options (optional) that manipulate the document as a. rar file object that is applied to the operation.
A file or file list is optional for a specific file or directory that modifies the operation document implementation.

A add files to the action document
Example: rar a test.rar file1.txt if Test.rar file does not exist, then pack file1.txt file into Test.rar
Example: rar a test.rar file2.txt if Test.rar file already exists, add file2.txt file to Test.rar
(so there are two files in the Test.rar)
Note, if a copy of a file is already in the action document, the A command updates the file and the directory can also operate
Example: rar a test.rar dir1

C Add explanatory notes to the action document
RAR C Test.rar
(the word reading comment from stdin appears, and then one or more line comments are entered, ending with ctrl+d)
CF adds a file annotation, similar to C above, but this is a comment on each file in the compressed document

CW writes document comments to a file
Example: RAR CW Test.rar comment.txt

D Delete files from the document
Example: RAR d test.rar file1.txt

E Extract the file to the current directory
Example: RAR e Test.rar
Note: With e decompression, not only the original file1.txt and File2.txt were extracted to the current directory, even dir1 inside all the files
Also extracted to the current directory, can not keep the directory structure before compression, if you want to maintain the compression before the directory structure, with x decompression

K Lock Document
Example: RAR k Test.rar Lock a document, the document will not be able to do any update operation

R Repair Document
Example: RAR r Test.rar
When a RAR file has a problem, you can try to fix it with this command (how much do you know how to use it)

s convert document into self-extracting document
Example: RAR s Test.rar
Generates a TEST.SFX executable document that works as a rar x Test.rar,
Suitable for transferring files to users without RAR

T detection document
Example: RAR t Test.rar
Detect the integrity of test.rar, generally compressed large files before the transfer of the best use of this command to ensure the correctness of the file

X-Path extract content from document to current directory
Example: rar x Test.rar
In this way, Dir1 will keep the original directory structure

Ubuntu below RAR Extract tool options Detailed:

CL converts a file name to lowercase
CU converts file names to uppercase
Example: RAR a-cl test.rar FILe.txt
FILe.txt after adding Test.rar, it becomes file.txt

Remove source files after DF document operation
Example: RAR a-df test.rar file1.txt file2.txt dir1
After you compress file1.txt,file2.txt,dir1 into Test.rar, delete the source file

Ed does not add empty directories
Example: RAR a-ed test.rar Dir1
Do not operate on empty directories when adding Dir1 to Test.rar
RAR e-ed Test.rar
Empty directory is not generated when Test.rar is uncompressed

K Lock File
Example: RAR a-k test.rar file1.txt
Equivalent to rar a test.rar file1.txt
RAR k Test.rar

M<0..5> set Compression level (0-storage, 3-default, 5-MAX)
Example: RAR a-m0 test.rar dir1 dir2
DIR1,DIR2 packaging to Test.rar without substantial compression (speed is very fast, suitable for the operation of a file without much pressure
such as avi,jpg, etc.)
RAR A-M5 Test.rar *.txt *.bmp
Packaging txt files and BMP files in the current directory into Test.rar, using the maximum compression ratio (slowest)

Ms[ext;ext] Specific files are not compressed
Example: RAR a-m5-ms avi;jpg;jpeg test.rar/home
Archive all directories and files in the home directory to Test.rar with maximum compression, but avi,jpg,jpeg files are not compressed
(Just pack into Test.rar, because these files can not be compressed even with the maximum compression, as a direct package to save time)

o+ Overwrite Existing Files
o Do not overwrite existing files
Example: RAR x-o-Test.rar
Extract the Test.rar file, but if it encounters a file that exists, it is not overwritten

Ol save symbolic links to linked files instead of normal files
ow save or restore the file owner's information (Username,group)
These two are *nix system-specific commands, so it's easy to understand.
————————————————————————
P[password] Set Password
Example: rar a test.rar *.txt-p prettygirl
Compressed file Set password for prettygirl, decompression without password can not operate
If you feel that the password is too exposed, you can use
RAR a Test.rar *.txt-p
The RAR program will ask you what password to use, do not echo

S-No use solid compaction
Note, solid compression is compressed document content can not change the compression method, this and lock is not the same. Because using normal compression
To take care of the need to delete individual files after inserting, there is a lot of room for manoeuvre. and solid compaction is not allowed to
The contents of any updates, so the compression ratio is the largest.

Sfx[name] Creates a self-extracting file, which is compressed first with a, and then the S conversion effect is the same.

Integrity Test after T compression complete
Example: RAR a test.rar/home-t
After the compression is tested, if there are problems, the error.

Ta<date> only action on files after data date
Tb<date> only action on files before data date
Note, date is formatted as YYYYMMDDHHMMSS.

V<SIZE>[K,B] Volume compression, per volume size specified by the following size
Example: RAR a-v15000k-m0 Test Xvid-fn.avi
Packaged storage for Xvid-fn.avi, 15000k per volume (this format is popular when publishing DVDRip online)
The generated file name is Test.part1.rar,test.part2.rar ... (RAR 3.20 Edition)

x<file> to exclude specific files
Example: rar x test.rar-x *.txt
Extract documents except *.txt in Test.rar
X@<list> Ditto, but this time all the excluded files are placed in the list file

Y all actions are answered yes
For example, sometimes every time you extract the same file to ask if the cover (y/n), plus-y can be selected by default Yes, no longer ask

Ubuntu under the extract Command encyclopedia:

. tar

Unpack: Tar xvf Filename.tar

Packing: Tar cvf filename.tar dirname

Note: Tar is packaged, not compressed.

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. gz

Decompression 1:gunzip filename.gz

Decompression 2:gzip-d filename.gz

Compression: gzip FileName

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. tar.gz and. tgz

Decompression: Tar zxvf FileName.tar.gz

Compression: Tar zcvf FileName.tar.gz dirname

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. bz2

Decompression 1:bzip2-d filename.bz2

Decompression 2:BUNZIP2 filename.bz2

Compression: Bzip2-z FileName

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. tar.bz2

Decompression: Tar jxvf FileName.tar.bz2

Compression: Tar jcvf FileName.tar.bz2 dirname

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. BZ

Decompression 1:bzip2-d filename.bz

Decompression 2:BUNZIP2 filename.bz

Compression: Unknown

. tar.bz

Decompression: Tar jxvf FileName.tar.bz

Compression: Unknown

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. Z

Decompression: uncompress filename.z

Compression: Compress FileName

. Tar. Z

Decompression: Tar zxvf filename.tar.z

Compression: Tar zcvf filename.tar.z dirname

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. zip

Decompression: Unzip Filename.zip

Compression: Zip Filename.zip dirname

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. rar

Decompression: rar x Filename.rar

Compression: rar a filename.rar dirname

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. Lha

Decompression: Lha-e Filename.lha

Compression: Lha-a Filename.lha FileName

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. rpm

Unpack: Rpm2cpio filename.rpm | Cpio-div

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

. deb

Unpack: ar p filename.deb data.tar.gz | Tar zxf-

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

Tar. tgz. tar.gz. Tar. Z. tar.bz. tar.bz2. Cpio. rpm. Arj. Lha. Lzh. Lzx. Lzs. SDA. cab SFX. Lnx. P. SLP. Zoo. it. Sit. Sea

Decompression: sEx x filename.*

Compression: SEx a filename.* FileName

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.