Extracting file or files from tar.bz2 in Linux, command line:
tar jxvf file.tar.bz2
- j - filtering the archive through bzip2
- x - extracting files from an archive
- v - listing the files processed
- f - using archive file
The command extracts the contents of a bzip2 compressed archive to the current directory.
Tar creates an archive of one or several files. Then bzip2 is used to compress it. Or both processes are made at once by tar only, with corresponding options employed. The duality of nature - archived and then compressed - is reflected in the extension of the file ("tar.bz2") and requires two procedures to be performed while extracting: decompressing and unpacking. Hence both j (decompress it) and x (unpack it) in the command.
Sources for the option letters description:
- Many other *nix systems