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.

How can I convert a sample.txt (uncompressed) file to sample.tar.bz2 format using Ubuntu 10.04 command shell?

share|improve this question
    
bzip2 sample.txt –  suspectus Jul 30 '13 at 9:11

1 Answer 1

up vote 7 down vote accepted

You can use tar to achieve this :

tar -cjf sample.tar.bz2 sample.txt

tar is a program used to manage archives, the options here are -c to create an archive (it would be -xto extract one), -j to use .tar.bz2 format, and -f to specify output archive name.

For more info : man tar.

share|improve this answer

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.