tar extract only one file to different directory code example Example: extract from tar gz into folder mkdir foo tar -xzf bar.tar.gz -C foo