|
NAMEHashCp - Hash and copy the contents of a file or stdin.SYNOPSIShashcp {source|-} targetNote: Command line arguments are position dependent. DESCRIPTIONHashCp is a utility that hashes a file as it is being copied to new name and/or location. The output produced by this utility is roughly equivalent to FTimes output produced with the following FieldMask:none+size+md5+sha1 It is not exactly equivalent to FTimes output because the name field is not encoded and it may contain a relative path depending on how the target file was specified. MODES OF OPERATIONCurrently, HashCp only has one mode of operation, which is given in the SYNOPSIS.RETURN VALUESUpon successful completion, a value of 0 (XER_OK) is returned. Otherwise, one of the following error codes is returned:
EXAMPLESExample 1. Standard hash and copy operationThis example demonstrates how to hash a file called 'out' (in the current directory) and copy it to '/tmp/out'.hashcp out /tmp/out Example 2. Hash and copy with input from echo(1)This example demonstrates how to hash stdin and copy it to a file called 'out.echo'. The data for stdin will be generated by the echo(1) command.echo "This is a test." | hashcp - out.echo Example 3. Hash and copy with input from dd(1)This example demonstrates how to hash stdin and copy it to a file called 'out.zero'. The data for stdin will be generated by the dd(1) command reading from /dev/zero.dd if=/dev/zero bs=32k count=1 | hashcp - out.zero SEE ALSOcp(1), ftimes(1)AUTHORKlayton MonroeHISTORYThis utility was initially written to make the process of copying and validating files more efficient. For example, suppose you need to archive some files for long-term storage (e.g., copy them to an external drive). In that case, you may also want to verify the integrity of those files before you store the drive away in your evidence locker. This utility allows you to do both.This utility first appeared in FTimes 3.9.0.
Visit the GSP FreeBSD Man Page Interface. |