[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: untarring tar file into specific directory



>>>>> "Darren" == Darren Wyn Rees <merlin@netlink.co.uk> writes:

    Darren> What option do I give tar to untar a file into a specific
    Darren> location ?  I've backed up /var; re-formatted the
    Darren> partition, and now I want to untar things back to /var.
    Darren> I've gone through the manual, but can't find the right
    Darren> option. (I need something like unzip's '-d exdir' option).

    Darren> -- Darren Wyn Rees

-C is your switch

Something like:

tar xzvf xxx.tar.gz -C /path/to/dir

for extracting the compressed tar archive here into the dir after -C
...
man tar - and info tar for a lot of info ;-)

[...]
 -C, --directory DIR
              change to directory DIR
[...]

HTH,

MH

-- 
(Dr.) Michael Hummel
mailto: mh@seitung.net || molino@gmx.net
--
fprint = F24D EAC6 E3D7 372C 9122 D510 EB24 01CA 0B56 B518
id: 1024D/0B56B518 key: http://www.seitung.net/key

Attachment: pgpcbE5nDKxaF.pgp
Description: PGP signature


Reply to: