compressing files and extracting files under Ubuntu Linux __linux

Source: Internet
Author: User
Tags rar
In general, Ubuntu with the tar command, can be used for decompression and compression. But we often have to deal with win under the user, so to install some decompression tools such as: RAR zip and other commands.

If you need to use a zip tool, you can:
sudo apt-get install zip
If you want to use RAR, the same
Suod apt-get Install rar


Let me explain
Use of the tar command:
Tar parameters:
-C: Package (but not compress) the file create
-X: Unpack the packaged files Excha
-Z: Compresses the packaged files.
-V: Displays the compression process.
-F: My understanding is to use the current name. such as the XXX directory, then packaged is Xxx.tar. After the compression is xxx.tar.gz
Ex
Workspace in the packaged directory (not compressed)
TAR-CVF Workspace.tar Workspace
Package and compress the WORKSAPCE in the directory
TAR-ZCVF workspace.tar.gz Worksapce

Extract
This needs to look at the suffix name, when the suffix name has. gz, which means that the package is compressed. Conversely, the person does not. But they can be extracted with tar.
1. Solution Package Workspace.tar
TAR-XVF Worksapce.tar
2. Solution Package Workspace.tar.gz
TAR-XVF workspace.tar.gz





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.