tar
-c: Create compressed file -x: Unzip -t: View content -r: Append file to the end of compressed archive -u: Update file in original archive Br>
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 The command is to solve all the files in the all.tar package, -x is the meaning of unlocking
Compression
tar –cvf jpg.tar *.jpg Package all jpg files in the directory into tar.jpgtar –czf jpg.tar.gz *.jpg After packaging all the jpg files in the directory into jpg.tar, and compressing them with gzip, generate a gzip-compressed package named jpg.tar.gztar –cjf jpg .tar.bz2 *.jpg Package all the jpg files in the directory into jpg.tar and compress them with bzip2 to generate a bzip2 compressed package named jpg.tar.bz2tar –cZf jpg.tar.Z *.jpg Package all the jpg files in the directory into jpg.tar, and compress them with compress to generate a umcompress compressed package named jpg.tar.Zrar a jpg.rar *.jpg rar format compression, Need to download rar for linuxzip jpg.zip *.jpg zip format compression, you need to download zip for linux
first extract
tar –xvf file.tar extract tar package tar -xzvf file.tar.gz extract Tar.gztar -xjvf file.tar.bz2 Unzip tar.bz2tar –xZvf file.tar.Z Unzip tar.Zunrar e file.rar Unzip rarunzip file.zip Unzip zip
Summary
*.tar with tar &ndash ;xvf decompress *.gz decompress gzip -d or gunzip *.tar.gz and *.tgz decompress tar –xzf *.bz2 decompress bzip2 -d or bunzip2 *.tar.bz2 decompress with tar –xjf *.Z Uncompress uncompress *.tar.Z Decompress with tar –xZf *.rar Unzip with unrar *.zip Unzip with unzip
undergoing change How long ago was the last time you compiled the kernel? The answer for the new gen
First, PCI bus system architecture PCI is the abbreviation of Peripheral Component Interco
The arping command can be used to test the connectivity between hosts on the LAN and test wh
Linux pipeline and redirection
Real-time automatic backup of switch configuration files every day with Linux server
Redis common operation command
Linux password ultimate crack battle
Linux configuration ip address
Linuxarping command to test IP address conflicts
Ubuntu configuration SSH password-free login
How to change the system sound scheme in Windows 8
Win10 preview upgrade why always fix Bug
Teach you the Notepad command method to quickly delete the specified registry key
Windows Novice System Installation Detailed
Ways to improve the speed and performance of Windows 7 systems
Integrating a large number of modules such as IIS7 What else can the Server2008 kernel do?
Graphical tutorial for adding language packs to Win8.1 system
Windows7 input method switching error is how to change how to solve
How to configure your computer's win7 function
Metro application under Win8 system shows offline can not be connected