Tar and compress a directory in Linux

The following will tar and compress the contents of a directory

tar czf file.tar.gz input_directory

The same can be extracted with tar but indicating compression .

tar xzvf file.tar.gz output_directory

Leave a Reply