tar
-c: create a compressed file -x: decompress -t: view the content -r: append to the end of the compressed archive File -u: Update the files in the original archive
These five are independent commands. One of them is used for compression and decompression. It can be used with other commands but only one of them can be used. The following parameters are optional when compressing or decompressing files as needed.
-z: with gzip attribute -j: with bz2 attribute -Z: with compress attribute -v: show all procedures -O: unpack the file to standard output
The parameter -f is required -f: Use the file name, remember, this parameter is the last parameter, only the file name can be followed. # tar -cf all.tar *.jpg This command is to make all .jpg files into a package called all.tar. -c indicates that a new package is generated, and -f specifies the file name of the package. # tar -rf all.tar *.gif This command adds all .gif files to the all.tar package. -r means to add a file. # tar -uf all.tar logo.gif This command updates the logo.gif file in the original tarball all.tar, and -u means the update file. # tar -tf all.tar This command lists all the files in the all.tar package, -t is the meaning of the listed files # tar -xf all.tar This command solves all the files in the all.tar package. -x is the meaning of unlocking Compress tar –cvf jpg.tar *.jpg //Pack all jpg files in the directory into tar.jpg tar –czf jpg.tar.gz *.jpg //All jpg in the directory The file is packaged into jpg.tar, and it is compressed with gzip to generate a gzip-compressed package named jpg.tar.gz tar –cjf jpg.tar.bz2 *.jpg //All jpg files in the directory After packaging it into jpg.tar, and compressing it with bzip2, generate a bzip2 compressed package named jpg.tar.bz2 tar –cZf jpg.tar.Z *.jpg //Pack all the jpg files in the directory After jpg.tar, and compress it with compress, generate a umcompress compressed package, named jpg.tar.Z rar a jpg.rar *.jpg //rar format compression, you need to download rar for linux zip first Jpg.zip *.jpg //zip format compression, you need to download zip for linux
unzip tar –xvf file.tar //decompress tar package tar -xzvf file.tar.gz //solution Tar.gz tar -xjvf file.tar.bz2 //Unzip tar.bz2 tar –xZvf file.tar.Z //Unzip tar.Z unrar e file.rar //Unzip rar unzip file.zip //Unzip zip< Br>
Summary 1, *.tar Decompress with tar –xvf 2, *.gz Decompress with gzip -d or gunzip 3, *.tar.gz and *.tgz Decompress with tar –xzf 4,*. Bz2 use bzip2 -d or bunzip2 decompression 5, *.tar.bz2 decompress with tar –xjf 6, *.Z decompress with uncompress 7, *.tar.Z decompress with tar –xZf 8, *.rar with unrar eUnzip 9, *.zip Unzip with unzip
When a person is operating under Linux, they may encounter that the file they are doing is accident
Computer Store News: According to the latest report from a German technology website, Valves Steam B
The disk sector defaults to 512 bytes. To verify, execute it from the command line: fdisk -l
Controlling access to files under Linux is a very important issue. Chmod is a method for modifying f
CentOS PPTP VPN Server (32-bit) installation basic tutorial
NVIDIA graphics driver installed under Linux system
Talking about the learning direction and method of Linux system
WindowsXP shutdown failure full contact, Window XP operating system tutorial
How to install and configure network devices on Linux system
Minicom can't input the problem solution
Linux Find Command Mastery Guide
Insufficient permissions in /etc/hosts cause database startup failure Solution
24 enhanced linux security tips
Ubuntu Linux system support for tablets released
What is the configuration required to install Win8?
[Video] Microsoft shows how to easily port iOS/Android applications to Win10
Easily protect your win7 product key
XP system can not reset the password should be how to do
Win8 system IE browser how to add Flash plugin
Simple three strokes to solve the phenomenon of suspended animation during Win7 installation process
Win10 colorful border theme package FlattasDark/Flattastic download