Posted By

micmath on 01/15/07


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Untar into a different directory

 / Published in: Bash

I want to tar up files in directory A, but have them extract into directory B when they are untarred.

  1. $ pax -w -s,/full/path/A,/full/path/B, -f /tmp/files.tar /full/path/A
  2. $ tar -tf /tmp/files.tar
  3. /full/path/B
  4. /full/path/B/lib
  5. /full/path/B/lib/bar.txt
  6. /full/path/B/foo.txt

Report this snippet  


RSS Icon Subscribe to comments
Posted By: shaiguitar on September 24, 2007

sounds trivial enough but i couldn't find anything on the net ... thx! :) shai rosenfeld

You need to login to post a comment.