Unable to create a *.gz archieve
You cannot add multiple files using gzip
because it is only a compression program, not an archiver. To compress multiple files, you would want to use tar
with gzip
:
tar czf archive.tar.gz file1.txt file2.txt
The z
tells the archiver to automatically use gzip
for compression. You could also tell it to use different compression algorithm. See the tar(1)
manual page for more information on this.