0

I need to extract huge file (.tgz) where I have thousands of unnecessary sessions located in folder /var/s3/tmp, so I want to exclude that directory while I'm extracting that file.

I have tried something like --exclude=/var/s3/tmp, but it didn't work.

  • What do those files look like in the tarball? e.g. tar tvzf foo.tgz | fgrep s3/tmp – thrig Sep 19 '17 at 19:17
  • Like this: s3/tmp/sess_8bhdakn7gs3em4174... – mirsad Sep 19 '17 at 19:20
  • 3
    So shouldn't you use --exclude=s3/tmp instead? – NickD Sep 19 '17 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.