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. 第八节:numpy之四则运算与逻辑运算

  2. 20170704-WNDR4300uboot help info

    Unknown command 'env' - try 'help'ar7240> help? - alias for 'help'base - print or set address off ...

  3. PAT 1114 Family Property

    This time, you are supposed to help us collect the data for family-owned property. Given each person ...

  4. ggplot画图笔记

    1.数据集相加符号 %+% 2.图形属性映射 aesc()函数 aes(x=mpg,y=wt)  把mpg属性映射为x,wt属性映射为y 图层图形属性可以添加.修改和删除映射. 如 3.位置调整参数 ...

  5. hdu_1061_Rightmost Digit_201311071851

    Rightmost Digit Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  6. http协议的再次理解

    1.Tomcat是根据server.xml的配置启动的.根目录下conf/server.xml. 2.Tomcat是根据server.xml的配置启动的.根目录下conf/server.xml. 3. ...

  7. 【iOS】代理传值与块代码传值

    主线程与子线程常常须要进行数据的传递.不同的类之间,不同的控制器之间都须要. 并且常常须要监听一个动作的完毕.而后才去做对应事件. (代理是一对一的关系). 一.代理传值 代理是一种设计模式. iOS ...

  8. 回调函数实现类似QT中信号机制(最简单)

    1. 定义回调接口类: class UIcallBack{public: virtual void onAppActivated() = 0; virtual void onShowMore() = ...

  9. C++常用字符串分割方法实例汇总

    投稿:shichen2014 字体:[增加 减小] 类型:转载 时间:2014-10-08我要评论 这篇文章主要介绍了C++常用字符串分割方法实例汇总,包括了strtok函数.STL.Boost等常用 ...

  10. Mybatis 碰到的一些问题

    1. SQL语句参数无法获取:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no get ...