2
votes
2answers
8k views

tar command - how to extract one file to specific directory

Is there a way to extract a single file from a tar file to a specific directory? In fact, I am dealing with a .tgz file so, I am attempting something like this : gunzip -c mytargzfile.tgz | tar xvf - ...