zoukankan      html  css  js  c++  java
  • Syntax to extract .tar.gz file

    Syntax to extract .tar.gz file

    The syntax is as follows:

    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

    Extracting tr.gz. file

    To 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
    To extract resume.doc file from backup.tar.gz tarball, enter:
    $ tar -zxvf backup.tar.gz resume.doc
    Where,

    1. -z : Work on gzip compression automatically when reading archives.
    2. -x : Extract tar.gz archive.
    3. -v : Produce verbose output i.e. display progress and extracted file list on screen.
    4. -f : Read the archive from the archive to the specified file. In this example, read backups.tar.gz archive.
    5. -t : List the files in the archive.
    6. -r : Append files to the end of the tarball.
    7. --delete (GNU/Linux tar only) : Delete files from the tarball.

    In order to untar a tar file, the -x (for extract) and -f options are needed.

    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

  • 相关阅读:
    创业公司新品如何寻求科技媒体的报道?
    DevStore分享:详析消费者十大心理学
    DevStore教你如何玩转饥饿营销?
    iClap分享:如何优雅的在 APP 中实现测试?
    java内部类
    Tostring 的用法
    Java 集合详解
    Java集合浅析
    异常--解析
    is-a 、have-a、和 like-a的区别
  • 原文地址:https://www.cnblogs.com/progamming/p/14516372.html
Copyright © 2011-2022 走看看