[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-tar] why tar can't automatically creates directories
From: |
Sergey Poznyakoff |
Subject: |
Re: [Help-tar] why tar can't automatically creates directories |
Date: |
Mon, 22 Apr 2019 11:21:19 +0300 |
<address@hidden> ha escrit:
> When I want to use tar to extract to the specified directory, I need, mkdir
> tar_dir ; tar xzf xx.tar.gz -C tar_dir
You can just do
tar --transform s,^,tar_dir/, -xf xx.tar.gz
instead. For details, see
https://www.gnu.org/software/tar/manual/html_node/transform.html#IDX444
Regards,
Sergey