Learn from the Linux learning of Brother Bird (8)--Compression and packaging of archives and file systems

Source: Internet
Author: User
Tags gz file

1. Another action on the file is to compress the file. Compressing files is a rare similarity between Linux and Windows. Most commonly used compressed file extensions are. Tar (tar program packaged data),. tar.gz (Tar program packaged data, gzip compressed),. tgz,.gz (gzip compressed files),. Z (Compress program compressed file),. bz2 (bzip2 compressed file). of which Gzip and bzip2 are most commonly used, and compress is obsolete. In addition, the simple tar function is just packaging, that is, a lot of files assembled into a file, in fact, he did not compress the function.

2. Compress-v man.config: Compressed config file, the Compress compressed source files will disappear, and only the compressed files, the extension is. Z, decompression is directly used Uncompress

3. Another compression instruction is gzip, the usage is gzip-v man.coonfig, the original file will be compressed into a. GZ archive name, and the original files no longer exist. The contents of the compressed file can be read directly with Zcat. If you want to decompress, use parameter D, which is gzip-d man.config.gz.

4. BZIP2 compression efficiency is better than gzip. Instruction is bzip2-z man.config, direct read is Bzcat man.config.bz2, unzip to bzip2-d man.config.bz2

5. Tar can combine multiple packages into a single file, and also can compress files simultaneously through GZIP/BZIP2 support, in fact, the WinRAR function of Windows also supports. tar.gz file name decompression. The decompression instructions for tar are tar-jxvf/root/etc.tar.bz2.

6. The main role of the dump command is to back up the entire file system out of the backup, and can also set the level. Common Dump-s/DEV/HDC1

7. DD If=/dev/zero of=/boot/test.img bs=1m count=10: Create a file about 10M in boot, if=input file,of=output file

8. Use restore to observe the contents of the backup data after dump, i.e. Restore-tf/root/boot.dump

Today Lunar New Year, I wish you a happy New Year ha!!

Learn from the Linux learning of Brother Bird (8)--Compression and packaging of archives and file systems

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.