Extract a specific folder to specific directory from a tar.gz

前端 未结 2 1378
借酒劲吻你
借酒劲吻你 2021-02-08 13:22

I have searched and found how to the two portions of what I want but nothing that would allow you to do it in whole....

What I would like to do is extract a specific fol

2条回答
  •  借酒劲吻你
    2021-02-08 14:03

    This worked for me on OS X (pulling specific files from a GitHub repo):

    # Move to target directory and run:
    curl -#L https://github.com/USER/REPO/tarball/BRANCH | tar -xzv --strip-components 3 --include=*./some/folder
    

提交回复
热议问题