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


Manual Reference Pages  -  HASHCP (1)

.ds Aq ’

NAME

HashCp - Hash and copy the contents of a file or stdin.

CONTENTS

SYNOPSIS

hashcp {source|-} target

Note: Command line arguments are position dependent.

DESCRIPTION

HashCp 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 OPERATION

Currently, HashCp only has one mode of operation, which is given in the SYNOPSIS.

RETURN VALUES

Upon successful completion, a value of 0 (XER_OK) is returned. Otherwise, one of the following error codes is returned:
o 1 = XER_Usage
o 2 = XER_Abort

EXAMPLES

    Example 1. Standard hash and copy operation

This 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 ALSO

cp(1), ftimes(1)

AUTHOR

Klayton Monroe

HISTORY

This 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.

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


perl v5.20.3 HASHCP (1) 2016-04-05

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