The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 05-14-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 711
Make sure you tar these directories up using relative links
eg
Code:
cd /some/dir/here
tar cf /path/to/tarball.tar subdir1 subdir2 subdir3/onlythispart
rather than
Code:
tar cf /path/to/tarball.tar /some/dir/here/subdir1 /some/dir/here/subdir2 ...
When you untar them again, change into the directory you want them to go to, then run the tar xf to unpack.
By default tar extracts files into the cirrent dir - unless you have used absolute paths when creating the tar, in which case it depends on the implementation of tar as to what it will do.
Reply With Quote