One thing that comes up a lot is mistakes that go unnoticed in the creation of tar
or zip
archives that are going to be sent to another person or site.
The following are the steps that should be followed:
Copy the files to an appropriate directory (make sure it really is a directory first).
Use
zip
ortar
to compress and create the archive.Use the
tell
orlist
option to be sure it looks correct. For TAR it'star -tvzf filename.gz
and for ZIP it'sunzip -l filename.zip
.Run the
sum
command against your file, and then send the file to where it needs to go.If using
scp
, usessh
to run thesum
command on the file on the remote system like the following:ssh <user@remote-host> /usr/bin/sum filename.gz
The two
sum
values should match.If using e-mail, run
sum
on your end, and send the result along with the e-mail.
A piece of advise for developers; suppose you are creating an archive of a programming project. To make absolutely sure you have copied every file it needs, create the archive and then copy it to another machine. Un-compress and build it as you normally would. An error will occur if a needed file is missing.