Results 1 to 5 of 5
I am trying to decompress a file with an file ending of tar.bz2 without creating a directory or folder once decompressing the file and extracting the data. The only thing ...
- 05-16-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 3
uncompressing a tar.bz2
I am trying to decompress a file with an file ending of tar.bz2 without creating a directory or folder once decompressing the file and extracting the data. The only thing I know about extracting data from a file like this would be to
type the command tar -jxvf file.tar.bz2. I know this extracts the data but my main concern is how do you just extract the data instead of the data being in a newly created sub-directory such as (/the file's name/data in the tar.bz2 file). I have tried to google this information but I don't see what I want or maybe I don't know what I'm looking for. Once again I want to strictly extract the important data without the extra folder that is created to put the important data into.
Ex:
tar -jzvf test1.tar.bz2
/test1/data1
/test1/data2
/test1/data3
/test1/ect...
I want:
tar -jzvf test1.tar.bz2
/data1
/data2
/data3
/ect...
Thanks
- 05-16-2008 #2
you cant do that since you compressed them with the folder test
if you want to that as you said, IMO, compress inside the test folder
i.e. ~/test$ tar -cvjf data.tar.bz2 data1 data2 data3
so on .....
- 05-16-2008 #3Just Joined!
- Join Date
- May 2008
- Posts
- 3
Thanks that helped!
- 05-16-2008 #4
actually you can do what you wanted to do in the first place
you do it as follows
and test1 will be goneCode:tar --strip-components 1 -jxvf test1.tar.bz2
Linux and me it's a love story
- 05-16-2008 #5
hey thanks, I never knew that !!


Reply With Quote