.bz2 is a compressed file created with bzip2 utility in Linux. Extracting these type of files is straight-forward in Linux, but in order to extract the file to another directory, you need to apply some options. Type the following command in Linux terminal:
$ bzip2 -dc your-file.bz2 > folder/your-file
d
stands for decompressc
tells bzip2 to output the decompressed content to the standard outputIn this command we forward the standard output to the specific file in another directory folder/your-file
. This also leaves the original .bz2 file unchanged. Also, note that the folder folder
must exists before using this command.