How to Compress and Extract tar.bz2 Files in the Terminal
Quick tip: to create a backup of a directory (like a website) with a .tar.bz2
format, you can compress it like this:
- To compress a directory, you can use:
tar -cjvf BACKUP_my_directory.tar.bz2 ./www
- To extract the tar.bz2 file do:
tar -xjf BACKUP_my_directory.tar.bz2