Assume that the file named emptyFile is empty (contains zero bytes) and that the remaining files contain data.
To prepare this directory for the transmission by the server, you must first run icepatch2calc. (The command shown assumes that the data directory is the current directory.)
Note that icepatch2calc compresses the files in the data directory (except for
emptyFile, which is not compressed). Also note that
icepatch2calc creates an additional file,
IcePatch2.sum in the data directory. The contents of this file are as follows:
Each line in the checksum file contains the name of the uncompressed file or directory (relative to the data directory), the checksum of the
uncompressed file, and a byte count. For directories, the count is
‑1; for uncompressed files, the count is
0; for compressed files, the count is the number of bytes in the
compressed file. The lines in the file are sorted alphabetically by their pathname.
If you add files or delete files from the data directory or make changes to existing files, you must stop the server, run
icepatch2calc again to update the
IcePatch2.sum checksum file, and restart the server.
icepatch2calc has the following syntax:
Normally, you will run icepatch2calc by simply specifying a data directory, in which case the program traverses the data directory, compresses all files, and creates an entry in the checksum file for each file and directory.
You can also nominate specific files or directories on the command line. In this case,
icepatch2calc only compresses and calculates checksums for the specified files and directories. This is useful if you have a very large file tree and want to refresh the checksum entries for only a few selected files or directories that you have updated. (In this case, the program does not traverse the entire data directory and, therefore, will also not detect any updated, added, or deleted files, except in any of the specified directories.) Any file or directory names you specify on the command line must either be pathnames relative to the data directory or, if you use absolute pathnames, those pathnames must have the data directory as a prefix.
Normally, icepatch2calc scans the data directory and compresses a file only if no compressed version exists, or if the compressed version of a file has a modification time that predates that of the uncompressed version. If you specify
‑z, the tool re‑scans and recompresses the entire data directory, regardless of the time stamps on files. This option is useful if you suspect that time stamps in the data directory may be incorrect.