CentOS + rar + unrar detailed instructions on installing rar unrar commands

Source: Internet
Author: User

CentOS + rar + unrar install rar unrar command details first write down the two most common rar commands to package the 21andy.com directory as andy.rar www.2cto.com # rar andy.rar. /21andy.com/decompress andy.rar to the current directory # rar x andy.rar CentOS + rar + unrar install www.2cto.com # vi/etc/yum. repos. d/dag. repo put the following content in [dag] name = Dag RPM Repository for Red Hat Enterprise Linux baseurl = http://apt.sw.be/redhat/el?releasever/en/?basearch/dag gpgcheck = 1 enabled = 1 gpgkey = http://dag.wieers.com/rpm/ Packages/RPM-GPG-KEY.dag.txt and then directly install yum # yum-y install rar unrarrar + unrar command details # rar -- help usage: rar <command>-<Option 1>-<option N> <compressed file> <file...> <@ file list...> <decompress path \> <command> a adds a file to compressed file c and adds compressed file comments (the comment size cannot exceed 62000 bytes) cf add file remarks (the file remarks are displayed when the 'V' parameter is used, and the maximum value cannot exceed 32767 bytes) ch changes the archive compression parameter cw writes archive remarks to the specified file d deletes a file from the archive e decompress the file to the current directory (no subdirectories are created) f. Refresh the files in the archive. (update the files generated after they are packaged. Do not add new files to the compressed archive) I [par] = <str> Search for a specific character k in the archive to lock the archive (any attempt to change the content of the compressed Archive Will be ignored) l [t, B] listing archives [technical, bare] m [f] Move to compressed files [for files only] p print files to standard output r patch compressed files rc reconstruction lost split volumes rn rename compressed files rr [N] add data recovery record rv [N] Create recovery volume s [name |-] compressed file and SFX (self-extracting document) conversion between t test compressed file u update compressed file v [t, B] list detailed information of compressed files [technical, bare] x decompress to the complete path <option>-stop scanning the option ad append the file name to the target path ag [format] use the current data to generate the compressed file name ap <path> in the file internal setting path as synchronous file directory av settings authentication detection (only the registered version provides this function) av-Disable authentication detection www.2cto.com c-close remarks show cfg-close read settings cl conversion name to lowercase letters Cu conversion name: uppercase letters df compression, delete original files dh open shared files ds close names for solid files sort dw compression, erase files e [+] <attr> set file exclusion and include attributes ed do not add empty directory en do not set archive end block ep name does not contain path ep1 name does not contain basic file directory ep3 expand path to fully contain drive name f refresh File hp [password] encrypted file data and file header id [c, d, p, q] disable message ierr send all messages to standard error output ilog [name] record error log to file (this function is only available for registered version) inul close all messages isnd Open Sound k lock compressed file kb keep decompressed corrupted file m <0 .. 5> set the compression level (0-storage... 3-default... 5-max) mc <par> set advanced compression parameter md <size> Dictionary size in KB (64,128, 25 6,512,102 4096, or A-G) MS [ext; ext] stores the specified file type n <file> only contains the specified file n @ reads the file name from the standard input to the included content n @ <list> contains the file o in the specified list file [+ |-] Set rewrite mode ol saves the symbolic connection for the file as a connection or automatically rename the file owner and group p [password] set the password p-do not ask the password r performs recursive operations on sub-directories r0 only uses the wildcard name to perform recursive operations on sub-directories rr [N] add data recovery records rv [N] Create recovery s [<N>, v [-], e] Create solid File compression s-close solid File compression SC <chr> [obj] Set specified string sfx [name] Create SFX file si [name] read data from standard input sl <size> the size of the processed file is smaller than the specified value. sm <size> the size of the processed file is greater than the specified value. t Compression After the test file ta <date> processes the files modified after the specified date, and the format is YYYYMMDDHHMMSS tb <date> processes the files modified before the specified date, <date> Format: YYYYMMDDHHMMSS tk keep the initial time of the file tl set the file time to the latest file time tn <time> process files earlier than the specified time to <time> process files earlier than the specified time ts <m, c, a> [N] File Storage Time (modify, create, access) u Update file v create automatic volume or list all volumes v <size> [k, b] Create a volume of the specified size = <size> * 1000 [* 1024, * 1] ver [n] file version control vn uses the old volume naming system vp to suspend w <path> specify working directory x <file> exclude specified file x @ exclude before each volume name of the file read from the standard input x @ <list> specifies the name to be sorted from the specified list file Except for file y, set all answers to yes z [file]. Note: The <command> part of rar does not contain the "-" number, only the <option> part contains the "-". Pay attention to this. Example 1: Add a file or directory to the compressed file and use the command. For example, run the or m command to upload the file1 file to abc.rar. After compression, the command will delete the original file1 file. Note: the m command only operates on files.) # rar a abc.rar file1 Description: if a file named file1 already exists in the file named "Taobao", the file named "file1" is updated. In addition, the original file1 file still exists in the current directory. To move the file1 file to file1.rar, run the m command. You can also perform this operation on the directory. Note: If you only enter the "rar a file1.rar" command but do not have a file name or directory name, all the files and directories under the current directory will be compressed into the file1.rar file. Pay attention to this. Example 2 of www.2cto.com: Decompress the content in the abc.rarfile. You can use the EOR xcommand. Assume that the directory abc.rar contains a file named file1 and a directory named test. The directory test contains a file named file2. # rar e abc.rar description: use the ecommand to decompress the file1 file in abc.rar together with the file2 file in the test directory to the current directory. If you want to keep the directory structure in the abc.rar directory, use the x command. # Rar x abc.rar Note: The file1 file and the test directory will be decompressed to the current folder. Example 3: add a comment for the entire compressed file # rar c abc.rar Note: After you enter this command, Processing archive test.rar Reading comment from stdin is displayed at the bottom of the screen and a cursor is blinking, enter the comments from the blinking position of the cursor. Press Ctrl + D. Input Example 4: add comments to a single file in the compressed file. Run the cf Command. If you want to add a comment for the file1 file in the abc.rar file # rar ch abc.rar file1, the screen will display the Reading comment for abc.rar at the bottom: file1 from stdin flashes from the cursor to enter the comments you want to add to file1. Ctrl + D end input Example 4: Write the comments of the entire file into a file and use the cw command. Add the abc.rar comment to the test.txt file # rar cw abc.rar test.txt Description: if a file named test.txt does not exist in the current directory, you will create a file named "文. Example 4: delete the file or directory in the compressed file and run the d command. For example, delete the file1 file in the abc.rar file. # Rar d abc.rar file1 Note: This command deletes the file1 file in the abc.rar file, which is also valid for directories. The preceding commands are commonly used for compression and decompression. The <option> section is not described. Please try it by yourself. Unrar: # unrar -- help usage: unrar <command>-<switch 1>-<switch N> <archive> <files...> <@ listfiles...> <path_to_extract \> <command> e. Extract the file to the current directory l [t, B] to list the compressed file information [technical, bare] p print file to standard output t test compression I am Russian when v [t, B] list detailed information of the compressed document [technical, bare] the command for extracting files from x to the complete path unrar has the same effect as rar. It can be seen that unrar only contains a part of rar commands, so you can use rar to complete all operations.

Related Article

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.