Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar help.

Status
Not open for further replies.

kahn630

Technical User
Mar 10, 2005
29
US
/dev/dsk/c0t4d0s4 4131866 3794633 295915 93% /jumpstart3

I wana tar the above /jumpstart3 and put in under /jumpstart_new..........I can not tar under /jumpstart3 cause there is no space, how can I tar and dump in to /jumpstart_new....

/dev/dsk/c0t4d0s5 10325760 4276314 5946189 42% /jumpstart_new
 
Try this...
Code:
cd /jumpstart3; tar cf - .| (cd /jumpstart_new; tar xfBp -)
If done as [tt]root[/tt], it will copy all ownership and permisssions too.

Hope this helps.
 
Actually, I just re-read your post and I'm not sure if my reply is right. What I gave you will copy everything that's in [tt]/jumpstart3[/tt] to [tt]/jumpstart_new[/tt]. It copies the whole directory tree using [tt]tar[/tt].

If you just want to create a tar file of [tt]/jumpstart3[/tt] in [tt]/jumpstart_new[/tt], do the following...
Code:
cd /jumpstart3
tar cvf /jumpstart_new/jumpstart3.tar .
That will create a tar file called [tt]/jumpstart_new/jumpstart3.tar[/tt] with the contents of [tt]/jumpstart3[/tt].

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top