Which tar option should you use?

If your file looks like:

Use the following command:

If your file looks like:

example.tar.bz2

Use the following command:

tar -xvf example.tar.bz2

If your file looks like:

example.tar.gz

Use the following command:

tar -xvf example.tar.gz

If your file looks like:

example.zip

Use the following command:

tar -xvf example.zip