[lug] tarring and untarring

Sean Reifschneider jafo at tummy.com
Tue Jul 9 14:59:37 MDT 2002


>Ken Nagorski wrote:
> 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...

I usually just do a "cp -a /path/to/src /path/to/dest" sort of thing.  The
trick you're thinking about could be something like:

   cd /path/to/src
   tar c . | ( cd /path/to/dest; tar x )

or:

   tar c . | tar x --directory=/path/to/dest

Sean
-- 
 You know you're in Canada when:  You see a flyer advertising a polka-fest
 at the curling rink.
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the LUG mailing list