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
is created (-c), then the name (path) of the file created after-F, if (-x/t), then-F is the package compressed file name to extract/view//Other auxiliary options-V//verbose display of the file name being processed-C Dir//To place the extracted files in the directory specified by-C-P (lowercase)//Preserve
Tar: create an archive file [Syntax] tar [option] tarfilefilename [command description] the file name must be followed by the-f parameter and
Tar
[Syntax] tar [option] tarfile filename
[Command description]
The
Tar
[Syntax] tar [option] tarfile filename
[Command description]
The file name must be followed by the-f parameter and used as the last parameter;
[Parameter description]
-C. Create a new archive file;
-F specifies the file name;
-R: append an object to an archive object;
-X
Linux Extract tar commandTar commandtar [-cxtzjvfppn] files and directories ....Parameters:-C: Create a compressed file parameter instruction (create meaning);-x: Unlock a parameter command for a compressed file!-T: View the files inside the Tarfile!In particular, in the release of the parameters, c/x/t can only exist
Compression:
Tar czvf/data/backup/test.tar.gz/data/a/b/directoryExtract:
Cd/data/testTar xzvf/data/backup/test.tar.gz
The problem is, the unpacked file, inside the/data/test/data/a/b/directory
To unzip in the current directory path.
That's going to work out.
Tar czvf/data/backup/test.tar.gz/data/a/b/directoryChange into
files, important parameters-P: (uppercase P) retains absolute path, allowing the backup data to contain the root directory exists--exclude=file: During compression, do not package FILETip: How to extract a single file within a packageTar-jtv-f directory/file name. tar.bz2 | grep ' Find the string 'grep is the ability
Tar package in Linux specify path fileWww.111cn.net Editor: Yahoo Source: ReprintIn the Linux system to package and extract files I can use the tar command to solve, as long as the use of different parameters can achieve different needs, the following to introduce you to the use of tar.Compression:Tar czvf/data/backup/test.tar.gz/data/a/b/directoryExtract:Cd/data
Use the tar command in CentOS7 to decompress the file
Linux: centos7,we often encounter compressed packages in the .gz format. This package is not an executable automatic installation package. This package is equivalent to a zip package, the installation process is the process of manually extracting, editing the configuration file, and configuring environment va
This article mainly introduces the example of using tarfile to compress and decompress the tar archive file in Python. This article provides examples of decompressing and compressing the code directly. if you need it, refer to the example below.
The zipfile module corresponds to the tarfile, and the zipfile process zip compression. Note: OS. system (cmd) allows Python scripts to execute commands, including
Directory1. Introduction to Commands2. Common parameter Introduction3. Example4. Direct access to the bottomIntroduction to CommandsThe tar command is used to package or decompress a file, with the extension ". Tar", which specifies that specific parameters can be called gzip or bzip2 to make a compressed package or extract
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
-fn.aviPackaged storage for Xvid-fn.avi, 15000k per volume (this format is popular when publishing DVDRip online)The generated file name is Test.part1.rar,test.part2.rar ... (RAR 3.20 Edition)
xExample: rar x test.rar-x *.txtExtract documents except *.txt in Test.rarX@
Y all actions are answered yesFor example, sometimes every time you extract the same file to as
This uses Apache Commons compress to extract the. tar.z format files.For a file Test.tar.z, we can understand the decompression process as:
Unzip the test.tar.z into Test.tar;
Unzip the Test.tar to test.
According to an example of Apache Commons compress:Extract. Z File Example:inputstream fin = Files. (Paths. ( "Archive.tar.z" )); Bufferedinput
The original text is referenced in: http://blog.csdn.net/zeng622peng/article/details/6837382How do I get the suffix named gzip file under Linux? 1. Files with a. A extension: #tar XV file.a2. Files with a. z Extension: #uncompress file. Z3. Files with the. gz extension: #gunzip file.gz4. Files with the. bz2 extension: #bunzip2 file.bz25. Files with the. tar.z ext
Extract the tgz file 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 parameter parameters:-c:create to establish the parameters of compressed archives;-X: Extract the
Tags: GRE sub Pat tar www. TPS Time Sort PathThe results of LS are sorted by time data, then 5 files at the end, and then the TAR command is called.ls-1 | Sort-u | Tail-5 |xargs-n1 Tar xzvf Use the grep command to search from a file.Grep-s Findstr/path/name.csv Extended Learningls Command detailedHttps://www.cnblogs.com/westoslinux/p/6400867.htmlThe sort comman
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.