A tarball (tar.gz file) is compressed tar archive.

  The tar program provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use Tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored.

  Syntax  

tar options file.tar.gz
tar options file.tar.gz pattern
tar -xf file.tar.gz
tar -xvf file.tar.gz
tar -zxvf file.tar.gz
tar -zxvf file.tar.gz file1 file2 dir1 dir2

  Extract tar.gz file

  Extract one or more members from an archive, enter:

tar -zxvf {file.tar.gz}

  If your tarball name is backup.tar.gz, enter the following at a shell prompt to extract files:

tar -zxvf backup.tar.gz

  Extract resume.doc file from backup.tar.gz tarball, enter:

tar -zxvf backup.tar.gz resume.doc

  Where,

  -z :  Work on gzip compression automatically when reading archives

  -x :  Extract archives

  -v :  Produce verbose output  i.e. progress and extracted file list on screen

  -f  :  Read the archive from the archive to the specified file.

  -t  :  List the files in the archive

 

  Extracting an entire archive

  To extract an entire archive, specify the archive file name only, with no individual file names as arguments.

tar -zxvf backup.tar.gz

  List files in archive

  To view a detailed table of contents (list of file), enter:  

tar -tvf backup.tar.gz

Linux之tar.gz file的更多相关文章

  1. (转载)linux下tar.gz、tar、bz2、zip等解压缩、压缩命令小结

    linux下tar.gz.tar.bz2.zip等解压缩.压缩命令小结 bz2 tgz z等众多压缩文件的压缩与解压方法,需要的朋友可以参考下 1) Linux下最常用的打包程序就是tar了,使用ta ...

  2. linux下tar.gz、tar、bz2、zip等解压缩、压缩命令小结

    Linux下最常用的打包程序就是tar了,使用tar程序打出来的包我们常称为tar包,tar包文件的命令通常都是以.tar结尾的.生成tar包后,就可以用其它的程序来进 行压缩了,所以首先就来讲讲ta ...

  3. lnmp安装--linux通过tar.gz源码包安装mysql

    mysql版本:5.6 [http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.22.tar.gz] [http://dev.mysql.com/get ...

  4. linux samba.tar.gz安装和配置

    安装步骤: 1. tar -xzvf samba-3.5.10.tar.gz2. cd samba-3.5.103. cd source34. ./autogen.sh  如果出现:./autogen ...

  5. Linux下tar.gz、tar、bz2、zip等解压缩、压缩命令小结(转)

    本文介绍了linux下的压缩程式tar.gzip.gunzip.bzip2.bunzip2.compress .uncompress. zip. unzip.rar.unrar等程式,以及如何使用它们 ...

  6. linux下tar gz bz2 tgz z等众多压缩文件的压缩与解压方法

    Linux下最常用的打包程序就是tar了,使用tar程序打出来的包我们常称为tar包,tar包文件的命令通常都是以.tar结尾的.生成tar包后,就可以用其它的程序来进 行压缩了,所以首先就来讲讲ta ...

  7. linux下tar.gz、tar、bz2、zip等解压缩、压缩命令

    转至:http://www.jb51.net/LINUXjishu/43356.html 说明:Linux下最常用的打包程序就是tar了,使用tar程序打出来的包我们常称为tar包,tar包文件的命令 ...

  8. linux下tar.gz、tar、bz2、zip、 xz、rar等解压缩、压缩命令小结

    http://www.jb51.net/LINUXjishu/43356.html unrar x aa.rarunrar e aa.rarx参数 是解压到一个文件夹里 e参数是把所有文件解压到当前目 ...

  9. linux下tar.gz、tar、bz2、zip等解压缩、压缩命令小结(转载)

    Linux下最常用的打包程序就是tar了,使用tar程序打出来的包我们常称为tar包,tar包文件的命令通常都是以.tar结尾的.生成tar包后,就可以用其它的程序来进 行压缩了,所以首先就来讲讲ta ...

随机推荐

  1. bupt summer training for 16 #7 ——搜索与DP

    https://vjudge.net/contest/174962#overview A.我们发现重点在于x,y只要累加就ok了 在每个x上只有上下两种状态,所以可以记忆化搜索 f[0/1][i]表示 ...

  2. NFS 文件系统的搭建

    教程: 一.配置linux内核: 进入打过at91补丁的linux2.6内核源代码树的根目录 make menuconfig进入内核配置程序. 1.  Networking ---> Netwo ...

  3. URIEncoding和useBodyEncodingForURI区别

    本文章会从tomcat的源码角度来解析Tomcat的两个参数设置URIEncoding和useBodyEncodingForURI. 对于一个请求,常用的有两种编码方式,如下: Java代码   &l ...

  4. nyoj_283_对称排序_201312051155

    对称排序 时间限制:1000 ms  |           内存限制:65535 KB 难度:1   描述 In your job at Albatross Circus Management (y ...

  5. Introduction(本书简介)

    本书简介 本书将从三个方面权威的阐述如何提高.net app 性能问题: 验证.测量性能指标,然后辨别它是否超过度量 从内存管理.网络.I/O.并发等方面提高应用程序的性能 通过CLR的详细的设计细节 ...

  6. Linux环境变量设置命令export(转)

    Linux export命令用于设置或显示环境变量. 在shell中执行程序时,shell会提供一组环境变量.export可新增,修改或删除环境变量,供后续执行的程序使用.export的效力仅及于该次 ...

  7. MVC.Net:WebAPI添加对jsonP的支持

    在某些情况下,我们需要在WebAPI项目中添加对jsonP的支持.比如我们同时创建了MVC.Net和WebAPI两个项目,这两个项目使用不同的端口,这时如果MVC.Net项目的前端想要直接访问WebA ...

  8. jQuery toast message 地址 使用

    jQuery toast message 地址 使用 https://github.com/akquinet/jquery-toastmessage-plugin/wiki

  9. 最简单的基于FFmpeg的移动端样例:Windows Phone HelloWorld

    ===================================================== 最简单的基于FFmpeg的移动端样例系列文章列表: 最简单的基于FFmpeg的移动端样例:A ...

  10. 哈理工2015暑假集训 zoj 2975 Kinds of Fuwas

    G - Kinds of Fuwas Time Limit:2000MS    Memory Limit:65536KB    64bit IO Format:%lld & %llu Subm ...