Conversion Tool from: http://www.ixdba.net/article/b2/515.htmltarlinux. Is to archive the file or directory into a file, but it is not compressed. Syntax format: Tar [primary option + secondary option] file or directory list master option-C create a new archive file-r append the file to be archived to the end of the archive file ixdba. NET technology community-t list the archived file list in the archive file-u Update file, replace the original file in the file with the new file. If this file does not exist in the backup file, append it to the end of the backup file-x restore the file from the file auxiliary options archive to the common file-K to save the existing file. For example, if the same file is encountered during restoration, it will not be overwritten-m when restoring the file, set the modification time of all files to the current time-V detailed tar processing process-W each step should be confirmed-Z use gzip to compress/decompress the file-J use Bzip2 to compress /decompress the file-Z to filter the file through the compress program. -F: for example, extract all the files in the/etc/directory to the current directory and name them as wpc.tar. The command is as follows: Tar CVF wpc.tar/etc/For example: Decompress wpc.tar in the current directory and run the following command: tar xvf wpc.tar ================================== File compression can file, you can also compress the archive file. gzip & gunzip syntax format gzip [Option] the compressed (decompressed) file name gzip compresses the source file to a. GZ file, and delete the common options of the original file to write the output to the standard output, and retain the original file-D to decompress the compressed file-L for each compressed file, the field is displayed: the size of the compressed file, the size of the uncompressed file, the compression ratio, and the name of the uncompressed file-r recursively searches for the specified directory, and compresses or decompress all the files. -T check whether the compressed file is complete-V shows the file name and compression ratio for each compressed and decompressed file.-num sets the compression ratio with the specified number num, and-1 or-fast indicates the lowest compression ratio, -9 or-best indicates the maximum compression ratio. The default value is 6-C. For example, to compress the wpc.bmp file in the current directory, run the following command: gzip-V wpc.bmp For example: unzip to decompress the file: gunzip-D wpc.bmp .gz command result: unzip zip & unzip. Syntax format zip compressed file name compressed file list example: Compressed, command: Zip wpc.zip WPC/* unzip syntax format unzip [Option] compressed file name. Zip common options-X file list decompress file, but does not include the file-V specified in the "file list" to view the directory of the compressed file. However, the-T test file is not damaged, but do not understand the pressure-d directory to extract the compressed file to the specified directory-Z only displays the compressed file annotation-N does not overwrite existing files-O overwrite existing files and does not require the user confirms that-J does not recreate the directory structure of the document, decompress all files to the same directory. For example, run the following command to decompress the current directory wpc.zip: unzip wpc.zip unzip Bzip2 syntax format Bzip2 [Option] [-compression grade] common options for compressing file names-C or -- stdout sends the compressed and decompressed results to the standard output-D or -- decompress for decompression -f or -- force Bzip2 during compression or decompression, if the output file has the same name as the existing file, the existing file will not be overwritten by default. to overwrite the existing file, you need to use this parameter-H or -- help to display the help-K or -- keep Bzip2. After compression or decompression, the original file is deleted. to retain the original file, use this parameter-S or -- small to reduce the memory usage during program execution-T or -- test .bz2 to compress the file integrity-V or -- verbose to compress or decompress the file, display detailed information-Z or -- compress force compression-V or -- version display version information-repetitive-best if the file contains repeated content, this parameter can be used to improve the compression effect-repetitive-fast if the file contains repeated content, you can use this parameter to speed up the execution, for example, extract. The command is as follows: Bzip2 wpc.tar. For example: uncompress the current directory wpc.tar.bz, command: Bzip2-D wpc.tar.bz2 Note: bunzip2 and Bzip2-d have the same effect
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