[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] How to extract files to a directory
From: |
Sergey Poznyakoff |
Subject: |
Re: [Bug-tar] How to extract files to a directory |
Date: |
Wed, 07 Apr 2010 23:58:21 +0300 |
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.
Regards,
Sergey