. The network is a magical thing, you do not need to remember, as long as the search, there will always be some place you need: reference to these twoUsing Microsoft.VisualBasic;Using Microsoft.VisualBasic.Devices;The following two sentences to resolve the renaming, hahaha, you laugh, suddenly think you saw yesterday a sentence, "Why programmers like to write code, because that is in the creation of a life, to give him the program intelligence ~"Computer MyComputer = new computer ();MyComputer.F
Python's Tarfile module makes it easy to read tar archive files, and Cow B is able to handle compressed archive files using gzip and bz2 tar.gz and tar.bz2.
Corresponding to the Tarfile is the ZipFile module, ZipFile is the processing of zip compression. Note: Os.system (cmd) allows the Python script to execute commands, of course including: Tar-czf *.tar.gz *,tar
Tar. download the source code file in linux and install tar in some cases. the decompression of the xz Z file is used to tar decompression. the xz file is still a bit confusing. google is as follows. to decompress the files in thi
/b.txtstudy/a/study/a/a/study/a/d/[[emailprotected] ~]$ lskernel linux study 2. Package and use gzip compression[[emailprotected] ~]$ lskernel linux study study.tar[[emailprotected] ~]$ tar -zcvf study.tar.gz study/ 使用 gzip 压缩study/study/a.cstudy/b.txtstudy/a/study/a/a/study/a/d/[[emailprotected] ~]$ lskernel linux study study.tar 3. Package and use BZIP2 compressiontar -jcvf study.tar.bz2 study/4. View a list of compressed files[[emailpro
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-rC
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
-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
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
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
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
extension:# Rpm2cpio file. RPM | cpio-Div12. Install files with the. Deb extension:# Dpkg-I file. Deb13. decompress the file with the. Deb extension:# Dpkg-Deb-fsys-tarfile file. Deb | tar xvf-ar PFile. Deb data.tar.gz | tar xvzf
:# Rpm2cpio file. RPM | cpio-Div12. Install files with the. Deb extension:# Dpkg-I file. Deb13. decompress the file with the. Deb extension:# Dpkg-Deb-fsys-tarfile file. Deb | tar xvf-ar PFile. Deb data.tar.gz | tar xvzf-14.files
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 B
file is available for direct operation and, of course, also helpful./file.bin--help Sometimes you can view help information;chmod a+x file.bin Set executable permissions, and then double-click or./file.bin if it is not in the current directory, specify an absolute path;RPM Software Package Installation:RPM-IVH software name. RPM (This is used to install a new RPM package)RPM-UVH software name. RPM (This is used to upgrade an RPM package, that is, the
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 F
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
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 ca
! Compression Complete!2, Unzip decompressionIn general, the options commonly used with the unzip command are the-O and-D options, and the rest can be viewed in a detailed-o option to overwrite the original file directly without asking the user-d option allows the user to specify an extract to the specified directoryExample:In the/root/test/directory, there are 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.