[lug] tarring and untarring

Michael Hirsch mhirsch at nubridges.com
Tue Jul 9 10:02:11 MDT 2002


On Tue, 2002-07-09 at 11: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...

tar cf - filename1 filename2 | (cd NewLocation; tar xvf -)

This should work with any tar.  GNU tar has a switch to tell it where to
extract, (I think it is -D) allowing you to dispense with the
parentheses and the cd.

--Michael




More information about the LUG mailing list