Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I made a bzip2 file by

bzip2 -c /home/os/picture1 > /home/os/Desktop/pic.image

bzip2 -c /home/os/picture2 >> /home/os/Desktop/pic.image

But now extracting pic.image by bzip2 -d /home/os/Desktop/pic.image returns

bzip2: Can't guess original name for pic.image -- using pic.image.out

and then it just creates one file pic.image.out.

How do I access picture1 and picture2 from pic.image?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

bzip2 is compression only. If you want file packing then you need to use tar as well.

share|improve this answer
    
And from the documentation: If the file does not end in one of the recognised endings, .bz2, .bz, .tbz2 or .tbz, bzip2 complains that it cannot guess the name of the original file, and uses the original name with .out appended. –  Arjan Dec 13 '10 at 14:02
    
so...now...there is no hack to access picture1 or picture2 from pic.image?? :-o –  usajbalt Jan 12 '11 at 15:53

You should use tar instead :

tar cjf /path/to/pics.tar.bz2 /path/pic1 /path/pic2
tar xjf /path/to/pics.tar.bz2 -C /path/to/extract/
share|improve this answer
    
Okay got you. BUT my file's extension is not .tar.bz2. It's just .image. What do you suggest to get my picture1 and picture2 from pic.image? Got any hack in mind?? –  usajbalt Jan 12 '11 at 15:54
    
hmm, all i can think of is writing a script that reads the file and extracts based on the bzip2 header, however there's no way of restoring the original file names that way. –  OneOfOne Jan 12 '11 at 19:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.