UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old February 16th, 2005, 10:12 AM
deb_dutta deb_dutta is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 25 deb_dutta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 2 m 4 sec
Reputation Power: 0
Question Want to Extract .tar file under a different/user specified directory.

Hi,
I am using SunOs 5.8. I have a .tar file(created using tar -cvf command) say user1.tar which is a backup of a /home/user1 directory. /home/user1 directory have some files (e.g .profile, x.sh etc.) and some sub-directories under this.
This tar files are kept under /tmp/bkup/ directory.
Now when i wants to extract the file (using tar -xvf command) files are extracted under its initial directory i.e "/home/user1/", but i want to extract all those files under /tmp/bkup/ directory i.e after extraction the "/tmp/bkup/" file system will looks like /tmp/bkup/home/user1/..........
Can anybody help me regarding this matter?
Thanks a lot.

Reply With Quote
  #2  
Old February 16th, 2005, 10:40 AM
vgersh99 vgersh99 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 47 vgersh99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 Days 5 h 36 m 43 sec
Reputation Power: 4
Send a message via AIM to vgersh99 Send a message via MSN to vgersh99 Send a message via Yahoo to vgersh99
man chroot

Reply With Quote
  #3  
Old February 16th, 2005, 11:08 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,077 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 13 h 40 m 11 sec
Reputation Power: 8
a) forgive the - in tar cmds, it's useless
b) NEVER ,NEVER ,NEVER ,NEVER ,NEVER do an absolute tar
c) follow vgersh99
d) it's not for beginners (+= you need root perms)
__________________
working on Solaris[5-9], preferred languages french and C.

Reply With Quote
  #4  
Old February 16th, 2005, 06:09 PM
deb_dutta deb_dutta is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 25 deb_dutta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 2 m 4 sec
Reputation Power: 0
I think for using chroot, root permission is required, that i did not have.
Is there any way to extract the contains of .tar file in another user defined directory.

Quote:
Originally Posted by vgersh99
man chroot

Reply With Quote
  #5  
Old February 16th, 2005, 06:31 PM
vgersh99 vgersh99 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 47 vgersh99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 Days 5 h 36 m 43 sec
Reputation Power: 4
Send a message via AIM to vgersh99 Send a message via MSN to vgersh99 Send a message via Yahoo to vgersh99
well..... according to absolute tar your other choice might be pax.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Want to Extract .tar file under a different/user specified directory.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway