bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] How to extract files to a directory


From: Peng Yu
Subject: Re: [Bug-tar] How to extract files to a directory
Date: Thu, 8 Apr 2010 10:28:58 -0500

On Wed, Apr 7, 2010 at 3:58 PM, Sergey Poznyakoff <address@hidden> wrote:
> Peng Yu <address@hidden> ha escrit:
>
>> tar xvf something.tar
>>
>> The above command by default extract the files to the current
>> directory. How to extract it to some other directory
>
> Either:
>
> cd somedir; tar xvf /path/to/something.tar
>
> or:
>
> tar -C somedir -xvf /path/to/something.tar
>
>> (if the directory doesn't exist, then create a new one)?
>
> test -d somedir || mkdir somedir; ...
>
> where `...' stands for one of above commands.
>
>> Is there an option for this?
>
> Nope, tar is not supposed to replace shell functionality in any way.

unzip has the option -d. I think that it would be convenient if tar
provides a similar option.

-- 
Regards,
Peng




reply via email to

[Prev in Thread] Current Thread [Next in Thread]