Ubuntu Extract Files Command Daquan

Source: Internet
Author: User
Tags bz2 rar

Ubuntu under RAR Decompression Tool installation method:

Compression function

Installing sudo apt-get install rar
Uninstalling sudo apt-get remove rar

Decompression function

Installing sudo apt-get install Unrar
Uninstalling sudo apt-get remove Unrar

Ubuntu under RAR Decompression Tool command detailed:

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

Usually the RAR command consists of a main command plus several options (optional), which manipulate the document for the. rar file object that the operation applies to,
The file or file list is the specific file or directory (optional) that implements the modification of the operating document.

A add file to action document
Example: rar a test.rar file1.txt if Test.rar file does not exist, then package 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 be manipulated
Example: rar a test.rar dir1

C Add notes to the action document
RAR C Test.rar
(The reading comment from stdin appears, and one or more lines of comments are entered to end the Ctrl+d)
CF adds a file comment similar to the one above, but this is a comment on each file in the compressed document

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

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

E Unzip the file to the current directory
Example: RAR e Test.rar
Note: With e decompression, not only the original file1.txt and file2.txt are 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 keep the directory structure before compression, with X decompression

K Lock Document
Example: RAR k Test.rar when the document is locked, the document is unable to perform any update operations.

R Repair Document
Example: RAR r Test.rar
When there is a problem with the RAR file, you can try to repair it with this command (ghost knows how much to use)

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

T Detection documentation
Example: RAR t Test.rar
Detection of the integrity of test.rar, generally compressed large files ready for transmission before the best use of this command to ensure the correctness of the file

X with path to extract contents from document to current directory
Example: rar x Test.rar
If you unzip this, Dir1 will keep the original directory structure.

Ubuntu next RAR Decompression tool options in detail:

CL converts the file name to lowercase
CU converts the file name to uppercase
Example: RAR a-cl test.rar FILe.txt
FILe.txt changes to file.txt after adding into Test.rar

Delete 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 an empty directory
Example: RAR a-ed test.rar Dir1
No empty directory operation when adding Dir1 to Test.rar
RAR e-ed Test.rar
Empty directory is not generated when extracting Test.rar

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 ratio level (0-storage, 3-default, 5-MAX)
Example: RAR a-m0 test.rar dir1 dir2
Storage of DIR1,DIR2 to Test.rar without substantial compression (extremely fast, suitable for operation with no very compressible files
such as avi,jpg, etc.)
RAR A-M5 Test.rar *.txt *.bmp
Package the TXT file and BMP file in the current directory into Test.rar, using the maximum compression ratio (slowest)

Ms[ext;ext] Specific files are non-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 the Test.rar, because these files will not press much even with the maximum compression, it is better to package directly save time)

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

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

S-Do not use solid compaction
Note, solid compaction is the compression of the contents of the compressed document, which is not the same as lock. Because using normal compression
The need to take care of future insertions to delete individual files leaves a lot of room for manoeuvre. and solid compaction can not
Any updates to its content, so the compression ratio is the largest.

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

Integrity check after T-compression is complete
Example: RAR a test.rar/home-t
After the compression has been tested, if there is a problem error.

Ta<date> only the data date after the file operation
Tb<date> operation only on data pre-date files
Note that the format of date is YYYYMMDDHHMMSS.

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

X<file> exclude a specific file
Example: rar x test.rar-x *.txt
Extract documents except *.txt in Test.rar
[Email protected]<list> Ibid, but this time all excluded files are placed in list files

Y all actions are answered yes
For example, sometimes when extracting each encounter the same file to ask whether to overwrite (y/n), plus-y can choose Yes by default, no longer ask

Ubuntu under the decompression command Daquan:

. tar

Unpacking: Tar xvf Filename.tar

Package: 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

Unpacking: Rpm2cpio filename.rpm | Cpio-div

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

. deb

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

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

Tar. tgz. tar.gz. Tar. Z. tar.bz. tar.bz2. zip. cpio. Arj. rar. Ace. Lha. Lzh. Lzx. Lzs., Arc. SDA. SFX. Lnx. Zoo. cab. Kar. cpt. P it. Sit. Sea

Decompression: sEx x filename.*

Compression: SEx a filename.* FileName

Ubuntu Extract Files Command Daquan

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.