Home > HP-UX > How to untar a file to a different destination directory HP-UX

How to untar a file to a different destination directory HP-UX

Let’s suppose you have a tar file and all the contents have absolute paths beginning with “/home/oracle” and you want to untar to “/u01”.  The command “pax” can accomplish task for you.

#cd /u01
#pax -v -r -s ‘,//*home//*,,’ -f  file.tar

The above command will substitute /home with blanks and remove the absolute path portion.  After running pax, you should have a new directory oracle under /u01.

Categories: HP-UX
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: