Tar command-linux

Source: Internet
Author: User
Tags rar extension uncompress
Tar command-linuxtar command first package the file and then compress it. Other] [mainly talk about tar, others include zip/unzip/rar/unrar] I. package or unpack files: Package/decompress files with the suffix. t... tar command-linux tar command first package the file and then compress it. Examples] [mainly about tar, others include zip/unzip/rar/unrar] I. package or unpack files: Package/decompress the package with the extension .tar. for example: # tar-cf all.tar * example. -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 used to list all files in the all.tar package.-t is used to list the meaning of the files. # The tar-xf all.tarcommand is used to extract all files in the all.tar package, -x indicates unzipping. 2. compress or decompress the file. [note: Three compression methods] tar can be packed or decompressed, and other compression programs can be called to compress or decompress the file, for example, gzip and bzip2 are called. 1) tarcall gzipgzipis a program developed by gnuorganization. the file ending with .gz is the result of gzip compression. The decompress program relative to gzip is gunzip. The tar parameter-z calls gzip [note:-z is a lowercase letter] for example: # tar-czf all.tar.gz * character. # Tar-xzf all.tar.gz unpacks the package. 2) the tarsearch bzip2bzip2is a more powerful compression program. The file ending with .bz2 is the result of bzip2 compression. The decompress program relative to bzip2 is bunzip2. The tar parameter-j calls gzip. For example, the command # tar-cjf all.tar.bz2 * Release # tar-xjf all.tar.bz2 unpacks the generated package. 3) tar calling compresscompress is also a compression program, but it seems that there are not as many people using compress as gzip and bzip2 .. The file ending with Z is the result of bzip2 compression. The decompress program relative to compress is uncompress. The tar parameter-Z calls gzip [note:-Z is an uppercase letter] Example: # tar-cZf all.tar. Z * worker. Z # tar-xZf all.tar. Z this command is to uncompress the package generated above. ZIP /. rar. zip and. rar are common compressed files in Windows. 1).zip is a compression program and unzip is a decompression program. For example, the command # zip all.zip * .jpg is to compress all .jpg files into a zip package # unzip all.zipthis command is to decompress all files in all.zip to 22.16.rar 1>. rar installation: to process the. RAR file under linux, you need to install RAR for Linux. you can download the file from the Internet, but remember that rar for Linux is not free of charge. then install: # tar-xzpvf rarlinux-3.2.0.tar.gz # cd rar # make 2>. rar uses rar as the compression program and unrar as the decompression program. For example, the # rar a all * .jpg command is to compress all .jpg files into a rarpackage named all.rar. the program automatically attaches the .rar extension name to the package name. # Unrar e all.rarthis command is used to extract all files from all.rar.
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.