Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Normally I'm extracting my copies with:

pigz -dc backup2_week1_system.tar.gz | tar xzvf -

Now I want to unpack specific directory from /home/user for example admin

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted
pigz -dc backup2_week1_system.tar.gz | tar vxf - FILE

where FILE is the file to extract. For example

pigz -dc backup2_week1_system.tar.gz | tar vxf - bob

Will extract the bob directory (e.g. /home/bob) from backup2_week1_system.tar.gz. Note that you don't need the z flag because pigz will already decompress the gzip'd portion.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.