Home
Sign Up
Sign In
Distributions
›
Ubuntu
›
Fedora
›
CentOS
中文资源站
›
网易开源镜像站
V2EX
›
Linux
tar 如何解压指定目录下的全部文件?
VKMEPR
·
Dec 3, 2018
· 4226 views
This topic created in 2904 days ago, the information mentioned may be changed or developed.
假设 abc.tar.gz 里有多个目录,需要解压其中一个目录下的全部文件。
如下尝试无效,解压整个目录出来,而不是只解压目录下的文件。
tar -xvf abc.tar.gz 目录名 /*
tar
目录
abc
3 replies
•
2018-12-03 17:09:45 +08:00
al0ne
Dec 3, 2018
1
直接把目录名字全部传过去不就可以了
yangg
Dec 3, 2018
2
xargs
VKMEPR
OP
Dec 3, 2018
3
已解决,原来有 --strip-components 参数可用。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1244 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms ·
UTC 17:08
·
PVG 01:08
·
LAX 09:08
·
JFK 12:08
♥ Do have faith in what you're doing.
❯