![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| untar | prakash96453 | UNIX for Advanced & Expert Users | 2 | 10-18-2007 10:59 PM |
| untar to a specified file | melanie_pfefer | UNIX for Dummies Questions & Answers | 3 | 11-27-2006 11:32 AM |
| Untar a TAR file at different location | malaymaru | UNIX for Dummies Questions & Answers | 5 | 09-18-2006 05:59 PM |
| Urgent....untar!!! | rahul26 | UNIX for Advanced & Expert Users | 4 | 06-12-2006 04:41 AM |
| Untar to different location | pradeep_desh | UNIX for Advanced & Expert Users | 1 | 05-26-2006 08:05 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Untar to different location
I have a tar file where the files have been tar'd along with the location of the file i.e
/opt/abc/file.txt /opt/abc/file2.txt I am trying to untar this file on a different server where /opt/abc does not exist. How do I untar these files without the tar trying to create the structure /opt/abc?? I really need to do this without the /opt/abc location being created on my server. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You could use pax:
pax -r -s '=^/opt/abc=/tmp=' < tarfile |
|
#3
|
||||
|
||||
|
Or maybe chroot
|
|
#4
|
|||
|
|||
|
You could install GNU tar from www.sunfreeware.com as that strips leading slashes form pathnames by default.
|
|||
| Google The UNIX and Linux Forums |