zoukankan      html  css  js  c++  java
  • tar只解压tar包中某个文件

    如果tar包很大,而只想解压出其中某个文件。方法如下:
    只想解压出Redis-1.972.tar  中的Changes文件,来查看有哪些更改。
    [root@nagios ~]# tar -tf Redis-1.972.tar                                                           
    Redis-1.972
    Redis-1.972/README
    Redis-1.972/Changes
    Redis-1.972/LICENSE
    Redis-1.972/dist.ini
    Redis-1.972/META.yml
    Redis-1.972/MANIFEST
    Redis-1.972/Build.PL
    Redis-1.972/Makefile.PL
    Redis-1.972/lib
    Redis-1.972/lib/Redis.pm
    Redis-1.972/t
    Redis-1.972/t/01-basic.t
    Redis-1.972/t/03-pubsub.t
    Redis-1.972/t/11-timeout.t
    Redis-1.972/t/30-scripts.t
    Redis-1.972/t/00-compile.t
    Redis-1.972/t/04-pipeline.t
    Redis-1.972/t/05-nonblock.t
    Redis-1.972/t/10-tie-list.t
    Redis-1.972/t/20-tie-hash.t
    Redis-1.972/t/02-responses.t
    Redis-1.972/t/07-reconnect.t
    Redis-1.972/t/50-fork_safe.t
    Redis-1.972/lib/Redis
    Redis-1.972/lib/Redis/Hash.pm
    Redis-1.972/lib/Redis/List.pm
    Redis-1.972/t/06-on-connect.t
    Redis-1.972/scripts
    Redis-1.972/scripts/publish.pl
    Redis-1.972/t/08-unix-socket.t
    Redis-1.972/t/42-client_cmds.t
    Redis-1.972/t/release-distmeta.t
    Redis-1.972/lib/Redis/Sentinel.pm
    Redis-1.972/t/release-pod-coverage.t
    Redis-1.972/scripts/redis-benchmark.pl
    Redis-1.972/t/tlib/Test
    Redis-1.972/t/tlib/Test/SpawnRedisServer.pm
    Redis-1.972/tools/benchmarks
    Redis-1.972/tools/benchmarks/read_vs_sysread.pl
    Redis-1.972/t/tlib/Test/SpawnRedisTimeoutServer.pm
    Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv
    Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/run.pl
    Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-recv.pl
    Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-sysread.pl
    Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-readline.pl
    Redis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/server-generator.pl
    [root@nagios ~]# tar xvpf Redis-1.972.tar Redis-1.972/Changes
    Redis-1.972/Changes
    [root@nagios ~]# ll Redis-1.972
    total 8
    -rw-r--r-- 1 3957780 10902869 5894 Feb 18 07:54 Changes

    ~转载于运维生存空间
  • 相关阅读:
    Android开发(三十二)——延时
    Android开发(三十一)——重复引用包错误Conversion to Dalvik format failed
    Android开发(二十九)——layout_weight的含义
    Android开发(二十八)——基础功能函数
    Android开发(二十七)——android:layout_weight的真实含义
    Android开发(二十六)——Application
    Android开发(二十五)——Android上传文件至七牛
    ansible
    H3C 交换机VRRP和堆叠
    Centos 7.x 双网卡绑定
  • 原文地址:https://www.cnblogs.com/AlwaysWIN/p/6085218.html
Copyright © 2011-2022 走看看