Linux decompression, Volume splitting, encryption 1, linux compression and decompression command 1) tar command compression the following list shows the slim parameters of the tar command, in fact, there are several main parameters. You can use the tar command to directly split the volume (but this volume has not been directly used). tar czvf file. tgz file // directory or file compression to file. tgz tar czvfp-file.tar.gz | split-B 5 m // compress the file and then split it into a volume cat x *> file. tgz // merge the files that have just been split into a file. tgz. tar unpack: tar zxvf FileName.tar package: tar czvf FileName.tar DirName # tar-cf all.tar *. the jpg command is to pack all. jpg files into a package named all.tar. -C indicates that a new package is generated.-f specifies the package file name. # Tar-rf all.tar * .gifthis command adds all. GIF files to the package of all.tar. -R indicates adding files. # Tar-uf all.tar logo.gifthe command is a newer version of The logo.gif file in tarbao all.tar.tar.-u indicates the meaning of the update file. # Tar-tf all.tarthis command is to list all files in the all.tar package.-t indicates to list the files. # tar-xf all.tarthis command is used to extract all files in the all.tar package *. jpg // pack all jpg files in the Directory into tar.jpg tar-czf jpg.tar.gz *. jpg // tar-cjf jpg.tar.bz2 *. jpg // tar-cZf jpg.tar. Z *. jpg // pack all jpg files in the Directory into jpg. Tar and compress them to generate an umcom The name of the presscompressed package is jpg.tar. zrar a jpg.rar *. for jpg/rar compression, download rar for linuxzip jpg.zip * first *. jpg // zip compression, download the zip for linux package tar-xvf file.tar // extract the tar package tar-xzvf file.tar.gz // decompress tar.gz tar-xjvf file.tar.bz2 // decompress tar.bz2 tar-xZvf file.tar. Z // decompress tar. z-A, -- catenate, -- concatenate append the tar file to archive-c, -- create creates A new archive-d, -- diff, -- compare to identify the differences between the archive and the file system -- delete from archive (non-tape !) Delete-r, -- append the file to the end of the archive-t, -- list to list the archive content -- test-label to test the archive volume label and exit-u, -- update only append the file-x, -- extract, and -- get File Operation modifiers updated from the archive: -- check-device: when creating an incremental archive, check the device number (default)-g, -- listed-incremental = File Processing incremental Backup in GNU format-G, -- incremental handles the incremental backup in the old GNU format -- ignore-failed-read do not exit-n with a non-zero value in case of unreadable files, -- seek Archive Retrieval -- no-check-device do not check the device NUMBER when creating an incremental archive -- occurrence [= NUMBER] Only processes the NUMBER event of each file in the archive; only when used with the following sub-commands -- delete ,- -This option is valid only when diff, -- extract, or -- list is used together. No matter whether the file list is provided in the form of a command line or specified using the-T option, the default NUMBER value is 1 -- sparse-version = MAJOR [. MINOR] sets the version (implicit -- sparse)-S, -- sparse efficient processing of discrete files rewrite control:-k, -- do not replace the existing files when decompressing the keep-old-files -- do not replace the existing files that are updated compared with the replicas in the archive -- no-overwrite-dir directory metadata -- overwrite overwrites the existing file -- overwrite-dir overwrites the metadata of the existing Directory (default) -- clear the directory hierarchy before recursive-unlink unzipping the directory -- remove-files delete the files after they are added to the archive, -- unlink-first delete the files to be overwritten before decompressing them-W, -- verify writes Try to check the archive and select the output stream later: -- ignore-command-error: ignore the exit code of the sub-process -- no-ignore-command-error: the non-zero exit code of the sub-process is considered as error-O, -- to-stdout decompress the file to the standard output -- to-command = COMMAND: -- atime-preserve [= METHOD] retains the access time on the output file, or restores the time after reading (default METHOD = 'replace, otherwise, do not set it to the first time (METHOD = 'system ') set the time -- delay-directory-restore to set the modification time and permissions for the directory to be extracted until the decompression is complete -- group = NAME forces NAME as the group owner of the added file -- mode = CHANGES force add the added file (Symbol) change to permission CHANGES -- mtime = DATE-OR-FILE: From DATE-OR-FILE, set mtime-m for the added FILE, -- touch do not extract the modification time of the file -- no-delay-directory-restore cancel -- delay-directory-restore option effect -- no-same-owner decompress the file for all your -- no -same-permissions: Use the user's mask bits when extracting the permission from the archive (the default value is normal user service) -- numeric-owner always uses numbers to represent the NAME of the user/group. -- owner = NAME forcibly uses NAME as the owner of the added file-p, -- preserve-permissions, -- same-permissions: Decompress the File Permission information (by default, only the superuser service is used) -- preserve is the same as-p and-s -- same-owner keeps the owner Relationship consistent-s when trying to decompress the package, -- preser Ve-order, -- same-order is extracted to match the archive sorting name device selection and switching:-f, -- file = ARCHIVE use an ARCHIVE file or ARCHIVE device -- force-local, even if the ARCHIVE file has a copy, it is regarded as a local ARCHIVE-F, -- info-script = Name, -- new-volume-script = Name: run the script (implicit-M)-L at the end of each volume of tape, -- tape-length = NUMBER: write the NUMBER × 1024 bytes before changing the tape-M, -- multi-volume create/LIST/decompress multi-volume archive file -- rmt-command = COMMAND replace rmt with the specified rmt COMMAND -- rsh-command = COMMAND replace rsh with remote COMMAND -- volno- file = FILE use/update the number of volumes in the file. The device is segmented: -B, -- blo Cking-factor = BLOCKS each record BLOCKS x 512 bytes-B, -- read-full-records reads the block again (only valid for the 4.2BSD pipeline)-I, -- ignore-zeros ignores the zero-byte block in the archive (that is, the end of the file) -- record-size = NUMBER of bytes per record NUMBER, multiplied by 512 to select the archive format:-H, -- format = FORMAT: One of the following formats is used to create an archive FORMAT for a specified format: gnu GNU tar 1.13.x oldgnu gnu format as per tar <= 1.12 pax POSIX 1003.1-2001 (pax) the posix format is equivalent to the pax ustar POSIX 1003.1-1988 (ustar) format v7 old V7 tar format -- old-archive, -- porta Bility is equivalent to -- format = v7 -- pax-option = keyword [[:] = value] [, keyword [[:] = value]... control the pax Keyword -- posix is equivalent to -- format = posix-V, -- label = TEXT to create an archive with the volume Name TEXT; when listing/extracting, use TEXT as the mode string compression option of the volume name:-a, -- auto-compress use the archive suffix to determine the compression program-I, -- use-compress-program = PROG filter by PROG (must be a program that accepts the-d option)-j, -- bzip2 uses bzip2 to filter archives -- lzma uses lzma to filter archives -- no-auto-compress do not use archive suffix to determine thecompression program-z, -- gzip, -- gunzip, -- Ungzip uses gzip to filter archive-Z, -- compress, -- uncompress uses compress to filter archive-J, -- xz filter the archive through xz -- lzop to filter archive Local files through lzop: -- add-file = add the specified FILE to the archive file (it will be useful if the name starts with-) -- backup [= CONTROL] backup before deletion, select CONTROL version-C, -- directory = DIR changed to directory DIR -- exclude = PATTERN exclude Files specified by PATTERN -- exclude-caches exclude files including CACHEDIR except the file identification. exclude-caches-all in the TAG directory to exclude CACHEDIR. TAG directory -- exclude-caches-u Nder exclude CACHEDIR. all contents in the TAG directory -- exclude-tag = FILE except FILE itself, exclude content in the directory containing FILE -- exclude-tag-all = FILE exclude directory containing FILE -- exclude-tag-under = FILE exclude all content in the directory containing FILE -- exclude-vcs exclude version control system directory-h, -- dereference trace symbolic links; archive and output the files they point to -- hard-dereference trace hard links; archive and output the files they point to-K, -- starting-file = MEMBER-NAME starts from the MEMBER-name member in the archive -- newer-mtime = DATE: compare data and time when only data changes -- no-null disable the previous effect -- null option -- no-recursion to avoid automatic downgrading in the directory Level -- no-unquote does not end with the file name read by-T as the reference -- null-T reads the name ended with null,-C disables-N, -- newer = DATE-OR-FILE, -- after-date = DATE-OR-FILE: Only Files updated compared with DATE-OR-FILE are saved in the local file system-P, -- absolute-names do not clear the boot character '/' from the file name -- recursion directory recursion (default) -- suffix = STRING is backed up before deletion, unless it is overwritten by the environmental variable SIMPLE_BACKUP_SUFFIX, otherwise, overwrite the common suffix ('')-T, -- files-from = obtain the FILE name from the FILE to decompress Or create the FILE. -- unquote uses the FILE name read by-T as the reference (default)-X, -- exclude-from = FILE exclusion mode listed in FILE Type string file name Transformation: -- strip-components = clear the NUMBER of pilot parts from the file name when extracting NUMBER -- transform = EXPRESSION, -- xform = EXPRESSION use sed instead of EXPRESSION for file name conversion file name matching options (which affect both exclusion and mode strings ): -- anchored mode: String Matching file name header -- ignore-case: case-insensitive -- no-anchored mode: string matching any '/' character (exclusion is effective by default) -- no-ignore-case matching case (default) -- no-wildcards: a string that matches words by word -- no-wildcards-match-slash does not match '/' -- wildcards uses wildcards (exclusion by default) -- wildcards-match-slash wildcard match '/' (exclude by default) Valid operation) Prompt output: -- checkpoint [= NUMBER] displays progress information every NUMBER of records (10 by default) -- checkpoint-action = ACTION execute ACTION -- index-file = FILE on each check point to send detailed output to file-l, -- check-links: print information as long as not all links are output -- no-quote-chars = STRING disables character reference from STRING -- quote-chars = extra reference from STRING character -- quoting-style = STYLE Set Name Reference style; for valid STYLE values, see the following description-R, -- block-number: Each information displays the number of blocks in the archive. -- show-defaults: the default tar option -- show-omitted-dir list or unzipping, listing each unmatched search Standard Directories -- show-transformed-names, -- show-stored-names: display the transformed file name or archive name -- totals [= SIGNAL]: print the total number of bytes after archiving; when this SIGNAL is triggered, the parameter-print the total number of bytes; allowed signals are: SIGHUP, SIGQUIT, SIGINT, SIGUSR1 and SIGUSR2; at the same time, it also accepts the signal name without the SIG prefix -- utc prints the file modification information in UTC format-v, -- verbose detailed list of processed files-w, -- interactive, -- confirmation each operation requires confirmation of compatibility options: When-o creates an archive, it is equivalent to -- old-archive; when the archive is expanded, it is equivalent to other options of -- no-same-owner :-?, -- Help to display this help list -- restrict to disable some potentially dangerous options -- usage to show brief usage instructions -- version print program version Long Options and corresponding short options have the same mandatory parameters or optional. Unless the backup suffix is set with -- suffix or SIMPLE_BACKUP_SUFFIX, the backup suffix is "~". You can use -- backup or VERSION_CONTROL to set version control. The possible values include none, no backup t for off, numbered for nil backup, and existing for numbered backup if the backup number exists, otherwise, simple always uses simple backup 2) the gzip command compresses files to reduce the size of two obvious advantages: one is to reduce the storage space, the other is to transfer files through the network, this reduces the transmission time. Gzip is a frequently used command in Linux to compress and decompress files, which is convenient and easy to use. Syntax: gzip [Option] compressed (decompressed) file name the meaning of each option of this command is as follows:-c writes the output to the standard output and retains the original file. -D. decompress the compressed file. -L the following fields are displayed for each compressed file: size of the compressed file, size of the uncompressed file, and compression ratio; name of the uncompressed file-r recursively searches for the specified directory and compresses all the files or decompress them. -T test to check whether the compressed file is complete. -V displays the file name and compression ratio for each compressed and decompressed file. -Num uses the specified numeric num to adjust the compression speed.-1 or -- fast indicates the fastest compression method (low compression ratio), and-9 or -- best indicates the slowest compression method (high compression ratio ). The default value is 6. Command instance: gzip * % compresses each file in the current directory into A. gz file. Gzip-dv * % decompress each compressed file in the current directory and list detailed information. Gzip-l * % detailed information of each compressed file in Example 1 is displayed without decompression. Gzip usr.tar %: the compressed tar backup file usr.tar. the extension name of the compressed file is .tar.gz .. Gz decompression 1: gunzip FileName.gz decompression 2: gzip-d FileName.gz compression: gzip FileName 2. The volume separation command tar zcvpf-eclipse in linux | the command above split-d-B 50 m is to compress the eclipse folder volume, 50 MB per volume, note that there are spaces in front of eclipse. after compression, it will be named x00, x01, x02... Merge: Run cat x *> eclipse.tar.gz and decompress tar zxvf eclipse.tar.gz 2) use the split command to split the volume # tar czvf google.tar.gz Google_Maps_API.doc # split-d-B 4 m google.tar.gz # cat x *> kernel # tar zxvf unzip kernel 3. linux-based Encryption encryption can be encrypted using commands such as command zip: zip-e filename.zip filename: enter the password twice. decryption: unzip filename.zip: enter the password as prompted.