A ".tar" file is a collection of files within a single file in an uncompressed form. If the file is a ".tar.gz" ( usually called tarball) or ".tgz" file then it is a collection of files in a compressed form.
To compress a file you could create the tar file with the
z option. Or alternatively you could create the file with any other tool and then use gzip to compress it.
Some Tar Options
c: create a new archived: delete from the archiver: append files to the end of the archivet: list contentsu: update (append files if newer)x: extractf: file?v: verbosez: gzip
Uncomprezing files:
# target file is a zipped tar ball $ tar -zxvf file.tar.gz # target file is simply a tar ball $ tar -xvf file.tar
Listing contents of the file
$ tar -tvf myfile.tar
Compressing files
# tar contents of folder foo in foo.tar $ tar -cvvf foo.tar foo/That is all, maybe I add more options as needed.
0 comments :
Post a Comment