how to extract tar file in linux

Read about how to extract tar file in linux, The latest news, videos, and discussion topics about how to extract tar file in linux from alibabacloud.com

Extract the specified file from the compressed package using the TAR command

The tar command not only extracts a package, but also extracts the files that are specified in the software package. Today a friend asked me, I just went to find the information, hehe root@ubuntu:/tmp# tar-tf json-1.2.1.tgz package.xml json-1.2.1/readme json-1.2.1/config.m4 Json-1.2.1/config.w32 json-1.2.1/json.dsp json-1.2.1/json.c json-1.2.1/json_parser.c Json-1.2.1/json_parser.h json-1.2.1/php

Tar extract tar.gz specified file to specified directory

Refer to How to link http://www.linuxdiyf.com/viewarticle.php?id=194348Don't talk nonsense directly on the exampleTAR-XZVF $basePath/apd.tar.gz jar/apd.jar-o > $basePath/apd.jar$basePath/apd.tar.gz files to unzipJar/apd.jar the relative file path within the apd.tar.gz file to be decompressed. How this path gets: TAR-TVF *.tar.gz.-O to decompress standard output>.

Detailed explanation of tar extract XZ file in Linux

People accustomed to tar czvf or tar xzvf may encounter tar.xz also want to use a single command to fix decompression or compression. Not really. The parameters of the XZ format, such as Z, for Gzip,j are directed at bzip2.To create a tar.xz file: Just tar cvf xxx.tar xxx/create xxx.tar files First, then use Xz-z Xxx

Tar to extract a specified file or folder

1. First look at the files in the compressed document, if you do not know the contents of the file, and then directly decompression, this is not possibleYou can view the contents of a compressed package by using the #tar-tf compressed package name2. Compress a fileTAR-ZXVF zabbix.tar.gz Zabbix-2.4.7/upgrades/dbpatches/2.2/readmeLook at the format is the decompression command, and then add the need to unzip

Linux tar (package. Compress. Unzip) Command Description | How does tar extract files to the specified directory?

: Back up all the files in the/etc/and save their permissions![Email protected] ~]# tar-czvpf/tmp/etc.tar.gz/etc# The properties of this-p are important, especially if you want to keep the properties of the original file!Example six: In/home, more than 2005/06/01 new files are backed up[Email protected] ~]# tar-n ' 2005/06/01 '-CZVF home.tar.gz/homeExample seven:

Package-Compress and unzip the tar and extract to the specified directory

Tar is commonly used on Linux packaging, compression, compression tools, he has a lot of parameters, folding only to enumerate the commonly used compression and decompression parametersParameters:-c:create set up the parameters of compressed archives;-X: Extracting parameters of compressed archives;-Z: Whether to use gzip compression;-V: Files are displayed during compression;-F: The top document name, immediately after F to answer the

How to create and extract zip, tar, tar.gz and tar.bz2 files under Linux

Over the years, data compression has been very useful for us. Whether it's a zip file for a picture sent in a message or a compressed data file on a server, we can make it easier or more efficient to save disk space. Some compression formats sometimes allow us to compress files at a ratio of 60% (or even higher). Below I will show you how to use these commands to compress files or directories under Linux. W

Java about the processing of compressed packets, I posted here three-format (Zip,rar,tar) decompression method (currently only used to extract, so compression too much research).

tarentry tarentry =Null; String destFileName = ""; String destdirname = "";while ((Tarentry = Zis.getnextentry ())! =Null{destfilename = destdir+ "\ \" + Tarentry.getname (). ReplaceAll ("/", "\\\\");//Get file Address destDirName = destfilename.substring (0,destfilename.lastindexof ("\ \"));//Get files directory File Dir =NewFile (destDirName);if (!dir.exists () | | |!Dir.isdirectory ()) {dir.mkdirs ();}/

Example of using Tarfile to compress and extract the tar archive in Python _python

Python's self-contained tarfile module makes it easy to read the tar archive, and cow B can handle using GZIP and bz2 to compress archive files tar.gz and tar.bz2.Corresponding to the Tarfile is the ZipFile module, ZipFile is the processing of zip compression. Please note: os.system (cmd) can make the Python script execute commands, including: Tar-czf *.tar.gz *,tar

CentOS7 using the tar command to extract the files

We often encounter packages packaged in. gz format, which is not an executable automatic installation package, which is equivalent to a ZIP package, which is the process of manually extracting, editing, configuring environment variables. You can compress a GZ file by using the following command:Tar zxvf Parameter description:Z-to filter the gzip file, that is, only the specified GZ format

Tar extract to specified directory

Parameters: -c:create to establish the parameters of compressed files; -X: Unzip the parameters of the compressed file; -Z: Do you want to use gzip compression; -V: The process of compressing the display of files; -F: Top document name, immediately followed by the file name, can not add parameters For example: One, all the files in the entire/home/www/images directory are packaged as/home/www/images.t

How to remove the directory structure and extract it to the specified directory when the tar command is decompressed

Remove directory structure plus--strip-components N Such as: Compressed file Eg.tar file information for Src/src/src/eg.txt Run TAR-XVF Eg.tar--strip-components 1 Result: Src/src/eg.txt If you run TAR-XVF Eg.tar--strip-components 3 The result of the decompression is: eg.txt In the decompression, if you want t

Linux feature file archiving and compression (tar, file, Zip)

This paper mainly from the following several convenient to explain file archiving and compression, while comparing the compression ratios and characteristics of several different compression methods. File Archive command tar,tar.gz source package installation Management Create a Tar Package-

One Linux command per day (file upload download file operation): "Reprint" tar Command

gzip unzip files-j Support bzip2 Extract files-Z Support Compress unzip files-V Show Operation procedure-L File System boundary settings-K Keep the original file without overwriting-m reserved files are not overwritten-W confirm the correctness of the compressed fileThe optional parameters are as follows:-B Set Number of blocks-c switch to the specified director

Linux file archive management-tar

/decompress the file. With this option, the file can be compressed, however, this option must be used for decompression during restoration. Tar common commands:-c: Create a compressed file-x: extract-t: View content-r: append a file

File compression and packaging in linux --- compress, gzip, zcat, bzip2, bzcat, tar, find, tarfile, tarball, --- compresszcat

the package in a specific directory. -P: (lower case p) retains the original permissions and attributes of the backup data. It is usually used to back up important configuration files, which are very important parameters. -P: (uppercase P) retains the absolute path, allowing the backup data to contain the root directory -- Exclude = FILE: Do not package the FILE during compression. Tip:

AIX file packaging and compression use of the tar gzip compress

Today in Aix with TAR-CVF backup, make a tar package, occupy the hard disk space is too large, no compression ratio, Try to use the TAR-ZCVF Linux system can use the-z command (z with gzip to compress/extract the file, plus this option to compress the archive

File compression and packaging in linux --- compress, gzip, zcat, bzip2, bzcat, tar, find, tarfile, tarball

directory. -P: (lower case p) retains the original permissions and attributes of the backup data. It is usually used to back up important configuration files, which are very important parameters. -P: (uppercase P) retains the absolute path, allowing the backup data to contain the root directory -- Exclude = FILE: Do not package the FILE during compression.Tip: extract

Linux under Zip Decompression tar decompression GZ decompression bz2 and other various decompression file commands

. rpm/extract Rpm2cpio file.rpm | Cpio-div. Deb/install Dpkg-i File.deb. deb/exrtact Dpkg-deb-fsys-tarfile File.deb | Tar xvf-AR P file.deb data.tar.gz | Tar Xvzf-. zip Unzip File.zip      Bzip2-d myfile.tar.bz2 | Tar xvf       Tar Xvfz myfile.tar.bz2       X is decompres

SSH combines the tar command to pull the remote file back or push it over (no landing data is pushed)

Log in 22 after tar compress/var/log directory output to standard input via pipeline to local 22_log.tar.gz file ssh 192.168.0.22 "Cd/var; Tar-zcvf-log"|cat >22_log.tar.gz re-creates the file in a relative location when extracting the archive file. You can use this method to

Total Pages: 2 1 2 Go to: Go

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.