path for the extracted files, such as the XZ compressed file as 1.txt.xz#xz-D 1.txt.xz-c >/tmp/1.txt4, ZipunzipZip followed by file compression after the filename and then with the file to be compressed, in the current directory compression, the original file will disappear, support compression directory but to add-rCompression: #zip 1.txt.zip 1.txtSpecify the compression path:#zip/tmp/a/1.txt.zip/tmp/1.txt compress the/tmp/1.txt to/tmp/a/under the text to 1.txt.zipCompression directory: #zip-R
above/tmp/etc.tar.gz files in the file?[Email protected] ~]# tar-tzvf/tmp/etc.tar.gz# because we use gzip compression, when we look at the files in the tar file,# you have to add Z to this parameter! It's important!Example three: Extracting/tmp/etc.tar.gz files under/USR/LOCAL/SRC[Email protected] ~]# cd/usr/local/src[[email protected] src]# tar-xzvf/tmp/etc.tar
-program PROGUse PROG to compress or decompress the archive (the PROG must accept the-d parameter)
-- Block-compressArchive records by block for ease of disk storage
-[0-7] [lmh]Specify the drive and density [High and Low]
--------------------------
Package: tar-cf soft.tar soft
Unpack: tar-xf soft.tar soft
Compressed directory
Compressed: tar czvf usr.tar.gz/hom
For details about tar, gzip, and unzip commands, refer to tar to create files and directories. Using tar, you can create a file (backup file) for a specific file, change the file in the file, or add a new file to the file. Tar is used to create detailed usage of
decompression.
$ Gzip-L *
Compressed uncompr. ratio uncompressed_name
277 445 43.1% mm.txt
278 445 43.1% sort.txt
277 445 43.1% xx.com
$ Ls
Mm.txt.gz sort.txt.gz xx.com.gz
Example 4: compress a Tartar file, for example, usr.tar. the extension name of the compressed file is .tar.gz.
$ Gzip usr.tar
$ Ls
Usr.tar.gz
Unzip command
How can I expand files compressed by WinZip in Microsoft Windows in Linux? You ca
Example 3: detailed information of each compressed file in Example 1 is displayed without decompression.
$ Gzip-L *
Compressed uncompr. ratio uncompressed_name
277 445 43.1% mm.txt
278 445 43.1% sort.txt
277 445 43.1% xx.com
$ Ls
Mm.txt.gz sort.txt.gz xx.com.gz
Example 4: compress a Tartar file, for example, usr.tar. the extension name of the compressed file is .tar.gz.
$ Gzip usr.tar
$ Ls
Usr.tar.gz
Unzip command
How ca
For details about tar, gzip, and unzip commands, refer to tar to create files and directories. Using tar, you can create a file (backup file) for a specific file, change the file in the file, or add a new file to the file. Tar was originally used to create files on tape. Now
. TarUnpack: Tar xvf filename.tarPackage: Tar CVF filename.tar dirname(Note: tar is packed, not compressed !)---------------. GZDecompress 1: gunzip filename.gzDecompress 2: gzip-D filename.gzCompression: gzip filename.Tar.gz and. tgzDecompress: Tar zxvf filename.tar.gzCompression:
1. Compress and Decompress commandsCommon compression formats:. zip,. gz,. bz2,. tar.gz,. tar.bz2,. rar. zip format compression and decompression commandsZip compressed file name source files: Compressed filesZip-r compressed file name Source directory: Compressed directoryUnzip compressed file name: Unzip. zip files. gz format Compression and decompressionGzip source files: Compressed files in. gz format, source files disappearGzip-c source Files > C
Zip is probably the most used document compression format. Its greatest advantage is in the use of different operating system platforms, such as Linux, Windows and Mac OS. The downside is that the compression ratios are not very high, and tar.gz and TAR.GZ2 are doing very well in terms of compression. Gossip less, let's get to the point:We can compress a directory with the following commands:# zip-r Archive_name.zip directory_to_compressThe following
. TarUnpack: Tar xvf filename.tarPackage: Tar CVF filename.tar dirname(Note: tar is packed, not compressed !)---------------. GZDecompress 1: gunzip filename.gzDecompress 2: gzip-D filename.gzCompression: gzip filename.Tar.gz and. tgzDecompress: Tar zxvf filename.tar.gzCompression:
Tar-C: Create compressed archives-X: Unzip-T: View content-r: Append files to the end of a compressed archive file-U: Update files in original compressed packageThese five are stand-alone commands, which use one of the compression decompression, and can be used with other commands but only one. The following parameters are optional when compressing or extracting files as needed.-Z: With gzip properties-j: W
TarUnpacking: Tar xvf Filename.tarPackage: Tar cvf filename.tar DirName-C: Create compressed archives-X: Unzip-T: View content-r: Append files to the end of a compressed archive file-U: Update files in original compressed packageThese five are stand-alone commands, which use one of the compression decompression, and can be used with other commands but only one. T
Tar-C: Create compressed archives-X: Unzip-T: View content-r: Append files to the end of a compressed archive file-U: Update files in original compressed packageThese five are stand-alone commands, which use one of the compression decompression, and can be used with other commands but only one. The following parameters are optional when compressing or extracting files as needed.-Z: With gzip properties-j: W
fails--totalsDisplays the total number of bytes written with the--create parameter-V,--verboseDetailed display of processed files-V,--label NAMEAssign a volume label to an archive--versionDisplays the version number of the TAR program-W,--Interactive,--ConfirmationEach operation requires confirmation-W,--VerifyVerify after writing to archive--exclude FILEDo not include the specified file-X,--exclude-from FILEReads a list of files that you do not want
Linux compression and decompression (zip, unzip, tar) detailed2012-05-09 13:58:39| Category: Linux | Tags: Linux zip unzip tar linux command detailed | report | font size SubscriptionDownload Lofter my photo book |Recently often on the Linux packaging compression decompression, collected from the Internet and combined
parameters of tar. The tar information is as follows:1. Command format:tar[necessary parameters [selection parameters] [file]2. Command function:Used to compress and decompress files. The tar itself does not have compression capabilities. is implemented by calling the compression function (-z,-j,-z in the command arguments), so as long as you do not specify thes
for a matching regular expression in a compressed file, using the same as the grep command, except that the object is a compressed file. If the user wants to see if there is a certain word in a compressed file, the Zgrep command is available.Bz:Bzip2-d filename.bzBUNZIP2 filename.bzBZ2:Generate Linux-2-4-2.tar using BUNZIP2 linux-2-4-2.tar.bz2Use tar xvf Linux-2-4-2.ta
Compression Decompression Command Introduction. GZ compression to gzip files. bz2 compression to bzip2 file. tar package files, merging multiple files into one directory. tar.gz first into a tar package, then compressed to gzip file. tar.bz2 first into a tar package, then compressed into a bzip2 file. Tar. Z first into
ArticleDirectory
Unzip the tar command in Linux
Unzip the tar command in Linux
Tar command
Tar [-cxtzjvfppn] file and directory .... Parameter:-C: Create a compressed file parameter command (create);-X: unlock a
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.