[英]Download specific folder from tar.gz file using wget command
I'd like to download and extract specific folder from tar.gz, which is stored on cloud space.我想从存储在云空间中的 tar.gz 下载并提取特定文件夹。 right now what i am following is
现在我关注的是
wget --auth-no-challenge --no-check-certificate --user=myuser --password=mypass <URL>
tar -xvf <Folder>tar.gz
now, i only want a specific repo from that extracted Folder.现在,我只想要那个提取的文件夹中的特定回购协议。
Folder文件夹
|-- Repo1 |-- 回购1
|-- Repo2 |-- 回购2
Problem:问题:
so minimize time and solve space issue i want to partially download specific repo from tar.所以尽量减少时间并解决空间问题我想从 tar 部分下载特定的 repo。
i tried我试过了
wget --auth-no-challenge --no-check-certificate --user=myuser --password=mypass <URL> | tar -xvf Folder/Repo1
which obviously does not work.这显然是行不通的。 I am trying to play with it, but couldn't succeed.
我正在尝试玩它,但无法成功。
any suggestion are appreciated.任何建议表示赞赏。 Thanks in advance:)
提前致谢:)
The command should be something like:命令应该是这样的:
wget --auth-no-challenge --no-check-certificate --user=myuser --password=mypass -O /dev/stdout <URL> | tar -xvf - Folder/Repo1/*
-O
)-O
)tar -xvf -
)tar -xvf -
)PS Nevetheless you will download entire file. PS 尽管如此,您还是会下载整个文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.