Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

tar ignore full paths

danielnachumdev answered on April 28, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • tar exclude directory
  • tar extract to path
  • exclude tar
  • tar exclude directory
  • tar exclude directories from a File
  • tar exclude directories from a File
  • tar folder excluding another folder
  • tar folder excluding many folders

  • tar ignore full paths

    0

    tar -cvf output.tar --transform='s,.*/,,' ./path/to/file/file1.txt ./file2.pdf .. 

    use this transform flag with the following value to remove the leading directories inside the result tar:

    ./path/to/file/file1.txt

    ./file2.pdf 


    ---->


    file1.txt

    file2.pdf

    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Apr 28 2023
    danielnachumdev
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.