Extracting a tar ball directly into a directory
Ih, I have a very silly question but I admit that I am not able to do that. Here it is
I have image.tar.bz2 file in my home directory which I want to extract into /tmp/test/ directory. And this is how I am approaching right now:
1.cp image.tar.bz2 /tmp/test/
2.cd /tmp/test/
3. tar -xjf image.tar.bz2
4. rm image.tar.bz2
Now what I would like is to extract the files directly into /tmp/test directory from the directory where image.tar.bz2 files resides(in this case it is my home directory) without first copying the tar ball(step1) and then removing the tar ball(step 4).
Thanks
|