[lug] tarring and untarring

Ed Hill ed at eh3.com
Tue Jul 9 09:52:33 MDT 2002


On Tue, 2002-07-09 at 09:42, Ken Nagorski wrote:
> Hi there,
> 
> Does anyone remember how to tar something to a new location. This trick is
> most generally used when someone wants to move a large number of files to a
> new location, like for instance, adding a larger drive to become the /var
> partition...
> 
> Ugh, there is some trick where you just run tar and pipe the output right
> to another tar and it tell it where to uncompress it.


Off the top of my head, its:

  tar -cvf - /path/to/tar | ( cd /new/path ; tar -xvf - ) 


hth,
Ed

-- 
Edward H. Hill III, PhD 
Post-Doctoral Researcher   |  Emails:      ed at eh3.com, ehill at mines.edu
Division of ESE            |  URL:         http://www.eh3.com
Colorado School of Mines   |  Phone:       303-273-3483
Golden, CO  80401          |  Fax:         303-273-3311
Key fingerprint = 5BDE 4DA1 66BE 4F7B BC17  3A0C 932B 7266 1E76 F123



More information about the LUG mailing list