How can I convert a sample.txt (uncompressed) file to sample.tar.bz2 format using Ubuntu 10.04 command shell?
1 Answer
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 -x
to extract one), -j
to use .tar.bz2
format, and -f
to specify output archive name.
For more info : man tar
.
bzip2 sample.txt