tar只解压tar包中某个文件
2024-10-14 21:55:12服务器运维 主机评测网
如果tar包很大,而只想解压出其中某个文件。方法如下:只想解压出Redis-1.972.tar 中的Changes文件,来查看有哪些更改。
如果tar包很大,而只想解压出其中某个文件。方法如下:
只想解压出Redis-1.972.tar 中的Changes文件,来查看有哪些更改。
[root@nagios ~]# tar -tf Redis-1.972.tar Redis-1.972Redis-1.972/READMERedis-1.972/ChangesRedis-1.972/LICENSERedis-1.972/dist.iniRedis-1.972/META.ymlRedis-1.972/MANIFESTRedis-1.972/Build.PLRedis-1.972/Makefile.PLRedis-1.972/libRedis-1.972/lib/Redis.pmRedis-1.972/tRedis-1.972/t/01-basic.tRedis-1.972/t/03-pubsub.tRedis-1.972/t/11-timeout.tRedis-1.972/t/30-scripts.tRedis-1.972/t/00-compile.tRedis-1.972/t/04-pipeline.tRedis-1.972/t/05-nonblock.tRedis-1.972/t/10-tie-list.tRedis-1.972/t/20-tie-hash.tRedis-1.972/t/02-responses.tRedis-1.972/t/07-reconnect.tRedis-1.972/t/50-fork_safe.tRedis-1.972/lib/RedisRedis-1.972/lib/Redis/Hash.pmRedis-1.972/lib/Redis/List.pmRedis-1.972/t/06-on-connect.tRedis-1.972/scriptsRedis-1.972/scripts/publish.plRedis-1.972/t/08-unix-socket.tRedis-1.972/t/42-client_cmds.tRedis-1.972/t/release-distmeta.tRedis-1.972/lib/Redis/Sentinel.pmRedis-1.972/t/release-pod-coverage.tRedis-1.972/scripts/redis-benchmark.plRedis-1.972/t/tlib/TestRedis-1.972/t/tlib/Test/SpawnRedisServer.pmRedis-1.972/tools/benchmarksRedis-1.972/tools/benchmarks/read_vs_sysread.plRedis-1.972/t/tlib/Test/SpawnRedisTimeoutServer.pmRedis-1.972/tools/benchmarks/readline_vs_sysread_vs_recvRedis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/run.plRedis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-recv.plRedis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-sysread.plRedis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/client-readline.plRedis-1.972/tools/benchmarks/readline_vs_sysread_vs_recv/server-generator.pl[root@nagios ~]# tar xvpf Redis-1.972.tar Redis-1.972/ChangesRedis-1.972/Changes[root@nagios ~]# ll Redis-1.972total 8-rw-r--r-- 1 3957780 10902869 5894 Feb 18 07:54 Changes
赞一个! ()