I created .tgz file with tar czvf file command.then I ended up with a tgz file. I want to know the difference between it and tar.gz.
I created .tgz file with tar czvf file command.then I ended up with a tgz file. I want to know the difference between it and tar.gz.
You can unzip tar.gz or .tgz with:
tar -xzvf
and create with:
tar -czvf
It is absolutely the same
Short answer: there is no difference.
Long answer:
Generally speaking: the extension name will differ depending on how you create your outcome file:
# Archiving THEN compressing: from SunOS or Linux:
$ tar cf output.tar /path/to/archvieme/
$ gzip output.tar
# creates "output.tar.gz" file.
# Archiving AND compressing: people usually save on typing and go with .tgz rather than .tar.gz:
# works only with GNU tar:
$ tar czf output.tgz /path/to/archiveme/
# works on SunOS and Linux:
$ tar cf - /path/to/archiveme/ |gzip > output.tgz