On 01/24/2013 10:55 AM, General Mail wrote:
Linux Version: 3.2.30 OpenSUSE 12.2 tar (GNU tar) 1.26
I have a tar archive with the following example contents:
root/ root/file1 root/file2 root/file3 ....
My pwd is /example/. Here is a listing of my example directory: $ pwd /example/ $ ls $ whereiwanttoextractmyfiles/ $ example.tar.bz
What I would like to happen is extract by first changing to the target directory which is whereiwanttoextractmyfiles/ and extract the contents of root/, so I end up with:
whereiwanttoextractmyfiles/file1 whereiwanttoextractmyfiles/file2 whereiwanttoextractmyfiles/file3
Instead, neither '--levels=' nor '--strip-components' gave me the results I wanted, I ended up with this:
whereiwanttoextractmyfiles/root/file1 whereiwanttoextractmyfiles/root/file2 whereiwanttoextractmyfiles/root/file3
I hope that I clear up the confusion
Now, it's clear, thanks. What about this? $ tar xf example.tar.bz --strip-components=1 -C whereiwanttoextractmyfiles $ find whereiwanttoextractmyfiles/ whereiwanttoextractmyfiles/ whereiwanttoextractmyfiles/file1 whereiwanttoextractmyfiles/file2 whereiwanttoextractmyfiles/file3 Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org