4
3
I always extract this kind of files using on the route where I want those files:
# tar -xvf file.tar.bz2
But it always creates a folder
called "file" (for this example) and stores all inside it.
I've never had problem with that, but now I need to avoid that folder and simply extract everything in the route where I want all to be.
I've been reading the man tar
(manual) .. but I still can't find an specific atribute that makes this.
How can I do that? (All in terminal
)
Great! It worked perfectly! .. If I have more than a single folder inside the .tar file and use the
--strip-components 1
what does it do? .. or can I specify which folder to unpack? – AAlvz – 2013-02-10T03:26:38.1671It removes the first component of every file, i.e.,
foo/bar/baz
will get extracted to./bar/baz
. If that's not desired, you have to use several tar commands. Before unpacking, you can executetar tf file.tar.bz2
to see exactly where the files would get extracted. – Dennis – 2013-02-10T03:36:56.210