The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-05-2006
rahul26 rahul26 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 15
Arrow Urgent....untar!!!

HI UNIX GURUS...
I am facing the a similar problem which malaymaru has posted earlier raegarding untaring a file in some other specified directory.But the solution by UNIX DAEMON "Perderabo" seems little difficult to understand.(USING #pax -r -s '=^/opt/abc=/tmp=' < tarfile)

So plz explain it.........i know this question has been posted earlier.But the number of replies is very less and little difficult to understand.So plz help.

The exact problem statement as follows:--

Suppose a directory is there in /abc/def/source_directory.
Now i make a tar of this directory as source_directory.tar and am successfully able to
ftp it to another server in the path ghi/jkl/source_directory.tar
Now how do i untar the source_directory.tar in the path ghi/jkl only.Now when i try to
untar it from my script using rexec command.the it is being untared to the HOME DIRECTORY
which i believe is happening due to conflict of path when untar is happening....
sample code i m using in my script to untar at the destination server once i m successfully able to ftp the filename.tar.gz file:
rexec azx.corp.asd.com gunzip $2/"$filename".tar.gz
rexec qwe.corp.fgt.com tar -xvf $2/"$filename".tar
plz post the exact solution...

Thanx,
rhaul26

Last edited by rahul26; 06-05-2006 at 09:41 AM..