GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
zidrav(1) zidrav(1)

zidrav - detect and repair corruption in transfered files

zidrav [-b bs] [-o CDT] corrupted file
 
zidrav -p [-i CDT] [-o CDP] original file
 
zidrav -a [-i CDP] corrupted file

zidrav is a file corruption detection and repair program. It's designed to provide a way to fix file damage without having to redownload the entire (potentially large) file over a (potentially slow) connection.
There are 3 steps to using zidrav (in the order of the SYNOPSIS commands):
1. Create a checksum file of the corrupted file.
 
2. Using the checksum file, create a patch file from the original file.
 
3. Apply the patch file to the corrupted file.
At each of the steps, the checksum or patch file has to be in the same directory as the corrupted or original file, depending on which step you're on, unless otherwise specified with -i.

-a
Apply the patch file to the corrupted file in order to fix it.
-b
Set the blocksize. The default blocksize it 16384.
-h
Show usage summary and exit.
-i
Specify the input filename of the checksum (CDT) or patch (CDP) files. You have to use this flag when the basename of the checksum or patch files doesn't match the name of the original file.
-o
Specify an output filename for the checksum (CDT) or patch (CDP) files. By default, the name of original file is used as the basename for these files.
-p
Build the patch file from the original file.
-V
Display version information and exit.

In this example, let's assume you've downloaded a large file named freebsd4.8.iso from a remote ftp which you have shell access to. The file was corrupted during transfer and you need to use zidrav to fix the file.
First, build a checksum file from the corrupted file on your machine:
 
zidrav freebsd4.8.iso
This creates a checksum file named freebsd.4.8.iso.cdt.
Next, transfer the checksum file to the remote ftp computer in the same directory as the original file. From that directory, type:
zidrav -p freebsd.4.8.iso
This creates a patch file named freebsd.4.8.iso.cdp.
Last, transfer the patch file back to your computer, in the same directory as the corrupted file. From that directory, type:
zidrav -a freebsd.4.8.iso
This will apply the patch and fix the corrupted file.

The corrupted file has to be equal in size as the original file. This makes it so you can't fix partially downloaded files until they're padded.

zidrav is written by Zorba <zorbathut@uswest.net>. Unix port was done by Piotr Krukowiecki {piotr at krukowiecki dot net}. This manpage by Cosmin Stroe <cstroe1@uic.edu>.
July 14, 2003

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.