tar is a tool that compresses and decompresses files, all with the same tool. tar has a lot of extra options. In order to see all of them, use the following command :
tar--help
How to use tar : compress/decompress
# syntax compressing (using the - is optional, for example : tar czvf is also accepted)tar-czvf<TOBEMADEFILE.tar.gz><file1><file2>##### compress recursivelytar-czvf<TOBEMADETARFILE.tar.gz><directory># from this point it will compress everything that is in the directory##### syntax decompressingtar-xvf<FILE.tar.gz>
tar example
# compress with tar root@Corrosie:~/test/test#lstest2.txttest3.jpegtest.txtroot@Corrosie:~/test/test#tar-czvftest.tar.gztest2.txttest3.jpegtest.txttest2.txttest3.jpegtest.txtroot@Corrosie:~/test/test#lstest2.txttest3.jpegtest.tar.gztest.txtroot@Corrosie:~/test/test## decompress with tarroot@Corrosie:~/test/test#lstest2.txttest3.jpegtest.tar.gztest.txtroot@Corrosie:~/test/test#rm-rftest2.txttest3.jpegtest.txtroot@Corrosie:~/test/test#lstest.tar.gzroot@Corrosie:~/test/test#tar-xvftest.tar.gztest2.txttest3.jpegtest.txtroot@Corrosie:~/test/test#lstest2.txttest3.jpegtest.tar.gztest.txt