Packing with tar gzip, bzip2 and zip

Looking back through my block i found my post about extracting archives. Now it’s time to continue here with the How to put files into archives. “tar.gz” with tar Here is some common way to create your archives. #Creates simple targetfile.tar without compression tar cvf targetfile.tar sourcedir/* #Zip everything beneath sourcedir to targetfile.tar.gz tar cvzf targetfile.tar.gz sourcedir/* #Bzip2 everything beneath sourcedir to targetfile.tar.bz2 tar cvjf targetfile.tar.bz2 sourcedir/* Parameters explanation: c or --create create a new archive v or --verbose verbosely list files processed z or --gzip usage of gzip compression (or also decompression, context dependent) j or -bzip2 usage of bzip2 compression f or --file use archive file Alternative with pipe usage:...

December 31, 2011 · 2 min · Alexander Holbreich

Extracting tar, gzip, bzip2, z

Sometimes there is a need to extract some files on Linux console. Below y’ll find list of most common methods for that. tar Tar archives are the most common way of distributing bundles of files under Linux or UNIX. The .tar file represents a bundle of files packaged with GNU tar program. To extract such files use: tar xf somearchive.tar tar xvf somearchive.tar Provide option f if you want to extract content of files....

February 1, 2009 · 2 min · Alexander Holbreich