Client Command (hcp)
The hcp command works to transfer files between the remote server and the hcpd daemon and also to copy files in the local network.
#
Basic FormatThe basic format is as follows.
Local : hcp [OPTION]... SOURCE [SOURCE]... DEST or : hcp [OPTION]... -f SOURCE_LIST_FILE DEST
Remote : Push : hcp [OPTION]... SOURCE [SOURCE]... [USER@]HOST[:PORT]:DEST Pull : hcp [OPTION]... [USER@]HOST[:PORT]:SOURCE [:SOURCE]... DEST
Remote using source file list : Push : hcp [OPTION]... -f SOURCE_LIST_FILE [USER@]HOST[:PORT]:DEST Pull : hcp [OPTION]... -f SOURCE_LIST_FILE DEST Pull : hcp [OPTION]... --source-file-host=HOST [--port=PORT] [--user=USER] -f SOURCE_LIST_FILE DEST
#
Option ListThe options for the hcp commands are below.
Copy
Description | Short Name | Option Name |
---|---|---|
Keep source permission | p | permission |
Recursive copy | R | recursive |
Regular expression use (Wildcard exemption) | g | regex |
Search any directories (Wildcard or regular expression is exempted) | Y | anydirs |
Verify transfer data/files by the message digest | y | verify |
Transmit compressed data blocks | z | compress |
Resolve symbolic links (Dereference) and copy files | s | copy-linkfile |
Resolve symbolic directory and copy files | S | follow-linkdir |
resolve symbolic links specified on SOURCE to copy | H | dereference-src |
Skip copying empty files | e | no-emptyfile |
Skip copying empty directories | E | no-emptydir |
Skip copying the files whose names start with '.'. | d | no-dotfile |
Skip copying the directories whose names start with '.'. | D | no-dotdir |
Copy the files with hidden attributes | I | copy-hidden |
Copy the files with archive attributes | A | archive-check |
Copy mode | m | copy-mode |
Overwrite mode | o | overwrite |
Specify how to behave when commands fail | a | fail-action |
Sequentially read data with the read function (when a device file is specified as a source) | reading-dev | |
Read data of devices via Mapped I/O (when a device file is specified as a source) | reading-dev-via-mmap | |
Set the transfer expiration by second | transfer-expire | |
Control message out-of-order suppress mode | no-out-of-order-header-messaging | |
Preserve read-only attributes of Windows files and folders | preserve-win-read-only |
Selectable Communication Method Function
Description | Short Name | Option Name |
---|---|---|
The HpFP protocol | hpfp | |
The WebSocket protocol(SSL/TLS) | wss | |
The port-separation UDP(HpFP) protocol(deprecated) | udp | |
The WebSocket protocol (plaintext communications) | ws | |
Directly connect to the Proxy server when the WebSocket protocol | ws-proxy-direct | |
Set the Proxy server when the WebSocket protocol | ws-proxy | |
Multiple connections | mcd |
Multiple File Batch Transfer Function
Description | Short Name | Option Name |
---|---|---|
Copy with a specified source file list | f | source-file |
Set the remote host (in use of the source file) | source-file-host | |
Set the remote port (in use of the source file) | port |
Congestion Control
Description | Short Name | Option Name |
---|---|---|
Congestion control modes in the HpFP protocol | hpfp-cong |
Data Flow Control, Message Data Size Control
Description | Short Name | Option Name |
---|---|---|
MSS(Maximum Segment Size) in the HpFP protocol | hpfp-mss |
Data Flow Control, Data Buffer Setting
Description | Short Name | Option Name |
---|---|---|
Set the sending buffer size for the HpFP protocol | hpfp-sndbuf | |
Set the receiving buffer size for the HpFP protocol | hpfp-rcvbuf |
Data Flow Control, Temporary File Save Function (Atomic File Save)
Description | Short Name | Option Name |
---|---|---|
Request for overwriting temporary files | overwrite-als-temp-file |
Authentication
Description | Short Name | Option Name |
---|---|---|
Server certificate checking is disabled in WebSocket protocol communications | wss-no-check-certificate | |
Specify a username first and transfer | user | |
Specify a password first and transfer | password |
Retransmission Function
Description | Short Name | Option Name |
---|---|---|
Resume the previous proceeding | r | resume |
Automatically resume copying when it stops due to the network issues | auto-resume |
Various Monitorings
Description | Short Name | Option Name |
---|---|---|
Investigation mode starts (deprecated) | investigation |
Performance Evaluation
Description | Short Name | Option Name |
---|---|---|
Measure disk I/O performance | N | no-send |
Measure the network I/O performance of communication protocol | n | no-diskio |
Log Management
Description | Short Name | Option Name |
---|---|---|
Specify an application log output destination | log-file | |
Specify various statistics log output destinations | stat-log-file | |
Specify an execution record output destination | hcp-out | |
Start in the multiple-run mode | multi-run |
Software Information Update
Description | Short Name | Option Name |
---|---|---|
Check the application version | V | version |
Check the configuration and input parameters | config-test | |
Display the command help | h | help |
System Operating Environment Settings
Description | Short Name | Option Name |
---|---|---|
Setting form a path of the configuration file | config-file | |
Make configuration from command line | config-option | |
Setting by a relative path from the current directory | include-conf-from-cwd | |
Server compatibility disabled | no-earlier-serv-compat |
Please refer to the hcpd command section on the following option.
--investigation
#
Copy#
p, permission=========================================================================Supported OS : Linux / WindowsFormat : -p | --permission=========================================================================
The file permission from the source (UID/GID, the flag with the execution right and so on) and file attributes (modification date and so on) are stored in the destination. When the permission and file attributes can’t be stored in the destination due to the access right, the attributes applied by OS when written in the file are kept.
--Example:[user@localhost ~]$ hcp -p ...--
#
R, recursive=========================================================================Supported OS : Linux / WindowsFormat : -R | --recursive=========================================================================
The directory from source is searched recursively and the file is transfered.
--Example:[user@localhost ~]$ hcp -R ...--
#
g, regex=========================================================================Supported OS : Linux / WindowsFormat : -g | --regex=========================================================================
The path from source is regarded as a regular expression.The path from source is regarded as a pattern string including wildcard (*) when no use of the option.
When specified path from source is not found as a directory or a file,verification by regular expression is carried out.In searching files, the names of files and directories are verified in this way.Files and directories which doesn’t match the pattern is skipped.Pattern strings is chosen from the strings after the last path delimiter (“/”).
--Example:[user@localhost ~]$ hcp -g ...--
#
Y, anydirs=========================================================================Supported OS : Linux / WindowsFormat : -Y | --anydirs=========================================================================
In the case that pattern matching is set by regex option or wildcard, directory search is carried out ignoring the pattern matching.
--Example:[user@localhost ~]$ hcp -Y ...--
#
y, verify=========================================================================Supported OS : Linux / WindowsFormat : -y | --verify=========================================================================
Data blocks and files to send are verified by message digest.
--Example:[user@localhost ~]$ hcp -y ...--
#
z, compress=========================================================================Supported OS : Linux / WindowsFormat : -z | --compress=========================================================================
Data blocks to send are compressed.
--Example:[user@localhost ~]$ hcp -z ...--
#
s, copy-linkfile=========================================================================Supported OS : Linux / WindowsFormat : -s | --copy-linkfile=========================================================================
hcp copies files that a symbolic link refers. A symbolic link is created in the destination, when this option is not used.
--Example:[user@localhost ~]$ hcp -s ...--
#
S, follow-linkdir=========================================================================Supported OS : Linux / WindowsFormat : -S | --follow-linkdir=========================================================================
hcp searches the directories that a symbolic link refers.
It should be noted that much data processing may happen with using this option, which is not unexpected with the information (number of files and their total size) got from the source path without resolving cyclic directory searches or its link.
--Example:[user@localhost ~]$ hcp -S ...--
#
H, dereference-src=========================================================================Supported OS : Linux / WindowsFormat : -H | --dereference-src=========================================================================
hcp makes dereference of symbolic links specified on SOURCE to copy files and directories.
--Example:[user@localhost ~]$ hcp --dereference-src ...--
#
e, no-emptyfile=========================================================================Supported OS : Linux / WindowsFormat : -e | --no-emptyfile=========================================================================
hcp dose not copy empty files.
--Example:[user@localhost ~]$ hcp -e ...--
#
E, no-emptydir=========================================================================Supported OS : Linux / WindowsFormat : -E | --no-emptydir=========================================================================
hcp dose not copy empty directories that have no files and no directories.
--Example:[user@localhost ~]$ hcp -E ...--
#
d, no-dotfile=========================================================================Supported OS : Linux / WindowsFormat : -D | --no-dotfile=========================================================================
hcp dose not copy files whose name starts with “.”.
--Example:[user@localhost ~]$ hcp -d ...--
#
D, no-dotdir=========================================================================Supported OS : Linux / WindowsFormat : -D | --no-dotdir=========================================================================
hcp dose not copy directories whose name starts with “.”.
--Example:[user@localhost ~]$ hcp -D ...--
#
I, copy-hidden=========================================================================Supported OS : WindowsFormat : -I | --copy-hidden=========================================================================
hcp copies hidden files.
--Example:[user@localhost ~]$ hcp -I ...--
#
A, archive-check=========================================================================Supported OS : WindowsFormat : -A | --archive-check=========================================================================
hcp copies files having archive attributes.
When the destination OS is Windows including the case when this option isn’t set, the archive attribute is set at the right time following the OS behavior.(This software doesn’t set any archive attribute configurations even when creating a new file and updating.)
--Example:[user@localhost ~]$ hcp -A ...--
#
m, copy-mode=========================================================================Supported OS : Linux / WindowsFormat : -m <mode_name> | --copy-mode=<mode_name>-------------------------------------------------------------------------mode_nameDefault : ALLCOPYRange of Values : ALLCOPY, UPDATE, DIFF, DIFF_STRICT, SYNC=========================================================================
The file copy mode is set.
ALLCOPY means copying all files.
In the UPDATE mode, the source file and the destination file are compared and when the source file is newer than the destination one, hcp copies the source file.
In the DIFF mode, the file size is also compared in addition to UPDATE.
In the DIFF_STRICT mode, the hashes of files are also compared in addition to DIFF.
In the SYNC mode, the destination file which doesn’t exists in the source,is deleted.(synchronization)
--Example:[user@localhost ~]$ hcp -m UPDATE ...--
#
o, overwrite=========================================================================Supported OS : Linux / WindowsFormat : -o <overwrite_name> | --overwrite=<overwrite_name>-------------------------------------------------------------------------overwrite_nameDefault : FORCERange of Values : CONFIRM, FORCE, RENAME, BACKUP=========================================================================
As for overwriting,the mode is set.
The CONFIRM mode overwrites with confirmation.
The FORCE mode overwrites without confirmation.
The RENAME mode renames the file by adding a following suffix on the original file names before overwriting.
.YYMMDD_HHMMSS.NNN (NNN are the sequence numbers)
The BACKUP mode moves the original file to the following backup directory before overwriting.
./YYMMDD_HHMMSS/
The directory name is created in the unique process during transactions.
--Example:[user@localhost ~]$ hcp -o CONFIRM ...--
#
a, fail-action=========================================================================Supported OS : Linux / WindowsFormat : -a <action_name> | --fail-action=<action_name>-------------------------------------------------------------------------action_nameDefault : HALTRange of Values : HALT, SKIP=========================================================================
The behavior in the case of file copy errors is set.
When some problems happen in file copying,The HALT mode stops the copy.
When some problems happen in file copying,The SKIP mode skips that file and keeps copying the next possible files.
--Example:[user@localhost ~]$ hcp -a SKIP ...--
#
reading-dev=========================================================================Supported OS : Linux / WindowsFormat : --reading-dev=========================================================================
It reads data with the read function, when any block devices or character devices are specified at the source.
#
reading-dev-via-mmap=========================================================================Supported OS : Linux / WindowsFormat : --reading-dev-via-mmap=========================================================================
It reads data with Mapped I/O, when any block devices or character devices are specified at the source.
#
transfer-expire=========================================================================Supported OS : Linux / WindowsFormat : --transfer-expire=<expire_sec>-------------------------------------------------------------------------expire_secDefault : noneRange of Values : number of seconds until expiration=========================================================================
Transferring files will be stopped at the specified second. As long as the file transferring completes in the specified time, it finishes transferring normally.
#
no-out-of-order-header-messaging=========================================================================Supported OS : Linux / WindowsFormat : --no-out-of-order-header-messaging=========================================================================
It suppresses out-of-order of the control message (including file request messages). It unlocks the behaviors such as sending only control messages by the primary connection in the multiple connection mode and the content data (messages including file payload) in the secondary connection. It enables to send all messages in all connections.
#
preserve-win-read-only=========================================================================Supported OS : Linux / WindowsFormat : --preserve-win-read-only=========================================================================
The read-only attribute on Windows in the destination is kept. It is applied when the read-only attribute on Windows in the destination is enabled, or Unix owners have only read access.
#
Selectable Communication Method Function#
hpfp=========================================================================Supported OS : Linux / WindowsFormat : --hpfp=========================================================================
It instructs transport to use HpFP protocol.
--Example:[user@localhost ~]$ hcp ... --hpfp /path/to/src_file 192.168.10.100:65520:/path/to/dst_file--
#
wss=========================================================================Supported OS : Linux / WindowsFormat : --wss=========================================================================
It instructs transport to use WebSocket protocol (SSL/TLS).
#
udp=========================================================================Supported OS : Linux / WindowsFormat : --udp=<hpfp_options> hpfp_options := <hpfp_udp_port>:<hpfp_cong_mode>:<hpfp_sndbuf>:<hpfp_rcvbuf>:<hpfp_mss>-------------------------------------------------------------------------hpfp_udp_portFormat : ( DEFAULT | D | <decimal_number> )Default : 65520Range of Values : decimal_number is 1 - 65535. D stands for DEFAULT-------------------------------------------------------------------------hpfp_cong_modeDefault : FAIRRange of Values : DEFAULT(D), FAIR(F), MODEST(M), FAIR_FAST_START(S), AGGRESSIVE(A)() is abbreviated notation.-------------------------------------------------------------------------hpfp_sndbufFormat : ( DEFAULT | D | <decimal_number>[[(T|G|M|K)]B] )Default : 100MB (Linux.x86 / Windows) 8MB (Raspbian)Range of Values : unsigned double-length integer in byte. D stands for DEFAULT.-------------------------------------------------------------------------hpfp_rcvbufFormat : ( DEFAULT | D | <decimal_number>[[(T|G|M|K)]B] )Default : 200MB (Linux.x86 / Windows) 16MB (Raspbian)Range of Values : unsigned double-length integer in byte. D stands for DEFAULT.-------------------------------------------------------------------------hpfp_mssFormat : ( DEFAULT | D | NONE | N | <decimal_number>[[(T|G|M|K)]B] )Default : NONERange of Values : unsigned integer (byte) D stands for DEFAULT. N stands for NONE.=========================================================================
This option is going to be deprecated.
It instructs transport to use HpFP protocol.
hpfp_udp_port specifies the UDP port number used in HpFP protocol.
hpfp_cong_mode specifies congestion control mode.
The sending buffer size of the HpFP protocol is set in hpfp_sndbuf in bytes.
The receiving buffer size of the HpFP protocol is set in hpfp_rcvbuf in bytes.
The MSS (Maximum Segment Size) of the HpFP protocol is set in hpfp_mss.The best size is the size of the MTU size minus 44 bytes of the protocol header.“N (NONE)” means none specified. When it’s “D”, the default value is used. when “N”, it is decided by the MTU serch in HpFP protocol.
Regarding congestion control mode, if the server desn’t accept the mode, FAIR is applied. When different algorism that user isn’t meant to is applied by this operation, which is notified by the following log.
2018/07/05 13:20:44 00007f9a2dfa0700:INFO :Your requested congestion mode of HpFP will not be used (requested=AGGRESSIVE, actual=FAIR).
--Example:[user@localhost ~]$ hcp --udp=D:S:4MB:8MB:8956B ...--
#
ws=========================================================================Supported OS : Linux / WindowsFormat : --ws=========================================================================
It instructs transport to use the WebSocket protocol (cleartext).
#
ws-proxy-direct=========================================================================Supported OS : Linux / WindowsFormat : --ws-proxy-direct=========================================================================
It instructs not to use proxy servers when the WebSocket protocol is used.
#
ws-proxy=========================================================================Supported OS : Linux / WindowsFormat : --ws-proxy=<proxy_server>-------------------------------------------------------------------------proxy_serverFormat : <proxy_server_address>:<proxy_server_port_number>Default : noneRange of Values : proxy server address and port number=========================================================================
A proxy server for the WebSocket protocol is specified, which is applied regardless of whether SSL/TLS is used. When it is not specified, it follows the system proxy setting.
#
mcd=========================================================================Supported OS : Linux / WindowsFormat : --mcd=<multiple_connection_degree>-------------------------------------------------------------------------multiple_connection_degreeDefault : noneRange of Values : 1 - 65535=========================================================================
The maximum of the multiple connections is specified. If not specified, it makes connections up to the maximum of the multiple connection setting on the server service. When 1 is set, it transmits by a single connection. In the case of over the maximum connections on the server service, it makes connections up to that.
#
Multiple File Batch Transfer Function#
f, source-file=========================================================================Supported OS : Linux / WindowsFormat : -f <source-path-list-file> | --source-file=<source-path-list-file>-------------------------------------------------------------------------source-path-list-fileDefault : noneRange of Values : path string of file system=========================================================================
It specifies the file including a list of the source.
--Example1: In the case of the source is localhost.
[user@localhost ~]$ cat source.listfile1.txtchild_dir/file2.txtchild_dir2//home/user/file3.txt
[user@localhost ~]$ hcp -f source.list ...--Example2: In the case of the source 1 is remote host.
[user@localhost ~]$ cat source.list192.168.100.100:874:file1.txt:child_dir/file2.txt:child_dir2/:/home/user/file3.txt
[user@localhost ~]$ hcp -f source.list ...--Example3: In the case of the source 2 is remote host.
[user@localhost ~]$ cat source.listfile1.txtchild_dir/file2.txtchild_dir2//home/user/file3.txt
[user@localhost ~]$ hcp -f source.list --source-file-host=127.0.0.1 ...--Example4: In the case of the source 3 is remote host.
[user@localhost ~]$ cat source.list192.168.100.100:874:file1.txt192.168.100.100:874:child_dir/file2.txt192.168.100.100:874:child_dir2/192.168.100.100:874:/home/user/file3.txt
[user@localhost ~]$ hcp -f source.list ...--
#
source-file-host=========================================================================Supported OS : Linux / WindowsFormat : --source-file-host=<remote-host>[:<remote-port>]-------------------------------------------------------------------------remote-hostDefault : noneRange of Values : IP address or hostname-------------------------------------------------------------------------remote-portDefault : noneRange of Values : port number=========================================================================
It specifies a remote host for the source-file option.
--Example:[user@localhost ~]$ hcp --source-file-host=192.168.100.100 ...--
#
port=========================================================================Supported OS : Linux / WindowsFormat : --port=<remote-port>-------------------------------------------------------------------------remote-portDefault : noneRange of Values : port number=========================================================================
It specifies a service port number of the remote host in the destination. When --source-file-host is used, this port is effective.
--Example:[user@localhost ~]$ hcp --port=1874 ...--
#
Congestion Control#
hpfp-cong=========================================================================Supported OS : Linux / WindowsFormat : --hpfp-cong=<hpfp_cong_mode>-------------------------------------------------------------------------hpfp_cong_modeDefault : FAIRRange of Values : FAIR(F), MODEST(M), FAIR_FAST_START(S), AGGRESSIVE(A)() is abbreviated notation.=========================================================================
The congestion control mode for the HpFP protocol is set.
In the case that a server doesn’t accept the specified congestion control mode, FAIR is set and the following log is output.
2018/07/05 13:20:44 00007f9a2dfa0700:INFO :Your requested congestion mode of HpFP will not be used (requested=AGGRESSIVE, actual=FAIR).
--Example:[user@localhost ~]$ hcp ... --hpfp --hpfp-cong=S /path/to/src_file 192.168.10.100:65520:/path/to/dst_file--
#
Data Flow Control, Message Data Size Control#
hpfp-mss=========================================================================Supported OS : Linux / WindowsFormat : --hpfp-mss=<hpfp_mss>-------------------------------------------------------------------------hpfp_mssFormat : ( NONE | N | <decimal_number>[[(T|G|M|K)]B] )Default : NONERange of Values : unsigned integer (byte) N stands for NONE.=========================================================================
MSS (Maximum Segment Size) for the HpFP protocol is set. MTU minus 44 bytes, the protocol header, is the optimal value. When N is set, the value is set by the MTU search by the HpFP protocol.
--Example:[user@localhost ~]$ hcp ... --hpfp --hpfp-mss=8956 /path/to/src_file 192.168.10.100:65520:/path/to/dst_file--
#
Data Flow Control, Data Buffer Setting#
hpfp-sndbuf=========================================================================Supported OS : Linux / WindowsFormat : --hpfp-sndbuf=<hpfp_sndbuf>-------------------------------------------------------------------------hpfp_sndbufFormat : <decimal_number>[[(T|G|M|K)]B]Default : 100MB (Linux.x86 / Windows) 8MB (Raspbian)Range of Values : unsigned double-length integer (byte)=========================================================================
The send buffer size (byte) for the HpFP protocol is set.
--Example:[user@localhost ~]$ hcp ... --hpfp --hpfp-sndbuf=8MB /path/to/src_file 192.168.10.100:65520:/path/to/dst_file--
#
hpfp-rcvbuf=========================================================================Supported OS : Linux / WindowsFormat : --hpfp-rcvbuf=<hpfp_rcvbuf>-------------------------------------------------------------------------hpfp_rcvbufFormat : <decimal_number>[[(T|G|M|K)]B]Default : 200MB (Linux.x86 / Windows) 16MB (Raspbian)Range of Values : unsigned double-length integer (byte)=========================================================================
The receive buffer size (byte) for the HpFP protocol is set.
--Example:[user@localhost ~]$ hcp ... --hpfp --hpfp-rcvbuf=16MB /path/to/src_file 192.168.10.100:65520:/path/to/dst_file--
#
Data Flow Control, Temporary File Save Function (Atomic File Save)#
overwrite-als-temp-file=========================================================================Supported OS : Linux / WindowsFormat : --overwrite-als-temp-file=========================================================================
It requests to overwrite a temporary file which already exists.
Without this option, the transferring file goes to the transfer error when a temporary file already exists.
As long as AtomicLikeSavingRejectOverwriteRequest is set to yes in the server setting, even though this option is on, overwriting a temporary file which already exists is rejected.
#
Authentication#
wss-no-check-certificate=========================================================================Supported OS : Linux / WindowsFormat : --wss-no-check-certificate=========================================================================
It instructs not to check server certificates when SSL/TLS in the WebSocket protocol is used. As a result, it receives server certificates without checking the CN (Common Name), expiration, intermediate certificate, and root certificate.
#
user=========================================================================Supported OS : Linux / WindowsFormat : --user=<username>-------------------------------------------------------------------------usernameDefault : noneRange of Values : user name=========================================================================
The user name for user authentication is set.
--Example:[user@localhost ~]$ hcp --user=user ...--
#
password=========================================================================Supported OS : Linux / WindowsFormat : --password=<password>-------------------------------------------------------------------------passwordDefault : noneRange of Values : password=========================================================================
The user credentials (password and pass-phrase) for user authentication are set.
--Example:[user@localhost ~]$ hcp --password=password ...--
#
Retransmission Function#
r, resume=========================================================================Supported OS : Linux / WindowsFormat : -r <run-record-path> | --resume=<run-record-path>-------------------------------------------------------------------------run-record-pathDefault : noneRange of Values : path string of file system=========================================================================
hcp restarts file operations with the execution records (the forwarding execution records output in .hcp.out).
--Example:[user@localhost ~]$ hcp ...[user@localhost ~]$ mv .hcp.out .hcp.in[user@localhost ~]$ hcp -r .hcp.in ...--
#
auto-resume=========================================================================Supported OS : Linux / WindowsFormat : --auto-resume=========================================================================
It automatically restarts copying when transmission stops due to network errors. However, in the case that a user stops copying by Ctrl+C, it doesn’t restart copying at that time.
It is recommended to use private keys that are not encrypted by passpharses for this purpose. If you need the passphrases, hcp make a cache on the memory of that passphrase to prevent interactive prompts from being shown for re-authentication.
#
Performance Evaluation#
N, no-send=========================================================================Supported OS : Linux / WindowsFormat : -N | --no-send=========================================================================
hcp runs without transferring data to the network.
This option is used to confirm the disk I/O at source and the performance of data processing.
--Example:[user@localhost ~]$ hcp -N ...--
#
n, no-diskio=========================================================================Supported OS : Linux / WindowsFormat : -n <bench_spec> | --no-diskio=<bench_spec> bench_spec := <number_of_files>:<file_size>-------------------------------------------------------------------------number_of_filesDefault : noneRange of Values : unsigned integer-------------------------------------------------------------------------file_sizeDefault : noneRange of Values : unsigned double-length integer=========================================================================
hcp runs without performing local I/O at source and destination.
This option is used to check the network transmission performance. Each meanings of the option parameter are below.
number_of_files := the number of files to transferfile_size := the size to transfer files (byte)
When the option is “0:0”, the sender path is searched as the normal operation and the file is transfered.(References of file attributes for the permission option and reading data of files are not carried out.)
This option is available even when /dev/zero is specified at the destination. In this case, it practically reads, transfers and writes the data from /dev/zero to the destination, whose size is specified by file_size in this option. Unlike the behavior described above, the I/O processing is not omitted. This option is typically used to check the transmission performance by specifying /dev/null at the destination and adding read/write by special devices.
--Example1:[user@localhost ~]$ hcp -n 1000:1048576 ...Example2:[user@localhost ~]$ hcp -n 1:1048576 /dev/zero 192.168.10.100:874:/dev/null--
#
Log Management#
log-file=========================================================================Supported OS : Linux / WindowsFormat : --log-file=<log-file-path>-------------------------------------------------------------------------log-file-pathDefault : noneRange of Values : path string of file system=========================================================================
The hcp command log is output in the file with the path configured.
--Example:[user@localhost ~]$ hcp --log-file=hcp.log ...--
#
stat-log-file=========================================================================Supported OS : Linux / WindowsFormat : --stat-log-file=<log-file-path>-------------------------------------------------------------------------log-file-pathDefault : noneRange of Values : path string of file system=========================================================================
The standard path for the statistics log output by the hcp commands is set.
Each statistics log is output in the configured path with suffixes.
<conigured path>.application (application statistics)<conigured path>.transport.tcp (TCP transport statistics)<conigured path>.transport.hpfp (HpFP transport statistics)<conigured path>.transport.ws (WS/WSS transport statistics)
--Example:[user@localhost ~]$ hcp --stat-log-file=.hcp.statistics2 ...--
#
hcp-out=========================================================================Supported OS : Linux / WindowsFormat : --hcp-out=<output-path>-------------------------------------------------------------------------output-pathDefault : noneRange of Values : path string of file system=========================================================================
The file to record transmission execution results is set.The output information by this option is used in the resume option.
--Example:[user@localhost ~]$ hcp --hcp-out=- ...SRC /home/user/Desktop/hcp_src5DST 127.0.0.1:11112:/home/user/Desktop/hcp_dst5OK 0000 FS 80000001 /home/user/Desktop/hcp_src5/file1.txtOK 0000 FT 00000001 /home/user/Desktop/hcp_src5/file1.txtEXIT 0 REASON 0000--
If this option is not specified, execution records are stored in the following files, etc., in the execute directories.
.hcp.out (Linux)_hcp.out (Windows)
When “-” is set, execution records are output as the standard output.
FT (File Transfer) shows procedures for file transfer, which format is below.
<result> <reason> FT <sequence> [<src_label> ]<path>
shows processing results, either OK or NG.
shows reason_code (described later), which explains the reason for the result.
is the sequence number for the processing.
is the source label corresponding to the file used in each processing. The format is below.
SRC<src_index>
is the index of the source specified.
shows the file path used in the processing, which is the path of the host executing the command.
When multiple sources are specified, progress information is recorded as below.
--Example:SRC0 /home/user/Desktop/hcp_src5\SRC1 /home/user/Desktop/hcp_src6\DST 127.0.0.1:11112:/home/user/Desktop/hcp_dst5\OK 0000 FS 80000001 SRC0 /home/user/Desktop/hcp_src5/file1.txt\OK 0000 FS 80000002 SRC0 /home/user/Desktop/hcp_src5/file2.txt\OK 0000 FS 80000003 SRC1 /home/user/Desktop/hcp_src6/file3.txt\OK 0000 FS 80000004 SRC1 /home/user/Desktop/hcp_src6/file4.txt\OK 0000 FT 00000001 SRC0 /home/user/Desktop/hcp_src5/file1.txt\OK 0000 FT 00000002 SRC0 /home/user/Desktop/hcp_src5/file2.txt\OK 0000 FT 00000003 SRC1 /home/user/Desktop/hcp_src6/file3.txt\OK 0000 FT 00000004 SRC1 /home/user/Desktop/hcp_src6/file4.txt\EXIT 0 REASON 0000\--
FS (File Sync) shows file synchronization processing. When the synchronization deletes files in the destination that don’t exist on the source host, the following text is recorded.
--Example:\SRC /home/user/Desktop/hcp_src5\DST 127.0.0.1:11112:/home/user/Desktop/hcp_dst5\OK 0000 FS 80000001 /home/user/Desktop/hcp_src5/file1.txt\OK 0000 FS 80000002 /home/user/Desktop/hcp_src5/file2.txt\OK A001 FS 80000003 /home/user/Desktop/hcp_src5/file3.txt\OK 0000 FT 00000001 /home/user/Desktop/hcp_src5/file1.txt\OK 0000 FT 00000002 /home/user/Desktop/hcp_src5/file2.txt\EXIT 0 REASON 0000\--
When a file cannot be identified in a single source, the index of the source label is shown by “?.”
--Example:\SRC0 /home/user/Desktop/hcp_src5\SRC1 /home/user/Desktop/hcp_src6\DST 127.0.0.1:11112:/home/user/Desktop/hcp_dst5\OK 0000 FS 80000001 SRC0 /home/user/Desktop/hcp_src5/file1.txt\OK 0000 FS 80000002 SRC0 /home/user/Desktop/hcp_src5/file2.txt\OK 0000 FS 80000003 SRC1 /home/user/Desktop/hcp_src6/file3.txt\OK 0000 FS 80000004 SRC1 /home/user/Desktop/hcp_src6/file4.txt\OK A001 FS 80000005 SRC? /home/user/Desktop/hcp_src6/file5.txt\OK 0000 FT 00000001 SRC0 /home/user/Desktop/hcp_src5/file1.txt\OK 0000 FT 00000002 SRC0 /home/user/Desktop/hcp_src5/file2.txt\OK 0000 FT 00000003 SRC1 /home/user/Desktop/hcp_src6/file3.txt\OK 0000 FT 00000004 SRC1 /home/user/Desktop/hcp_src6/file4.txt\EXIT 0 REASON 0000\--
In the last line, and are recorded in the following format.
EXIT <exit_status> REASON <reason_code>
When the setting, UseProperCopyAndSync described later is set as yes, on searching a directory, the judging result on overwriting is recorded in the following format.
<result> <reason> DE <sequence> [<src_label> ]<path>
#
multi-run=========================================================================Supported OS : Linux / WindowsFormat : --multi-run=<record-path>[:<output-switch>]-------------------------------------------------------------------------record-pathDefault : noneRange of Values : path string of file system-------------------------------------------------------------------------output-switchFormat : ( (A|T|R|L)[...] | THRU | FULL )Default : THRU=========================================================================
A client starts in the multiple run mode. With this option, the following logs are recorded in unique file names in the specified directory. It is used when plural clients access to the same directory simultaneously or executing another applications is taken place in the background.
- Application statistics
- Transport statistics
- Result output
- Application log
record-path specifies the directory of these log files.
output-switch specifies the control of these logs outputs.
A stands for the application statistics. With this option, the application statistics is recorded in the following file name in the directory specified above.
hcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.statistics.application
T stands for the transport statistics. With “T”,the transport statistics is recorded in the following file name in the above directory.
hcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.statistics.transport.<protocol>
R stands for the execution result. With “R”,the execution result is recorded in the following file name in the above specified directory.
hcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.out
L stands for the application log. With “L”,the application log is recorded in the following file name in the above specified directory.
hcp.mr.<YYYYMMDD_hhmmss_msec>.<pid>.log
With “FULL”, the behavior is the same as one with “ATRL”.
With “THRU”, outputs of the records are processed following the specifications of the configuration files and commands. When the application statistics (transport statistics) in the configuration file is enable,it is recorded in the above file name. When the result output (the application log) is enable (without -v and with -l),the execution record (log) is output in the above file name.
--Example:[user@localhost ~]$ hcp --multi-run=/var/tmp:ATR // The log is output as standard. Other files are output in /var/tmp.--
#
Software Information Update#
V, version=========================================================================Supported OS : Linux / WindowsFormat : -V | --version=========================================================================
The hcp command version is shown.
--Example:[user@localhost ~]$ hcp -Vhcp client (hcp) 1.3.4_3 / Linux (HpFP2 2.0.0.91_21 WSAPI 0.0.1.30 WS 4.2.0-1)--
#
config-test=========================================================================Supported OS : Linux / WindowsFormat : --config-test=========================================================================
The hcp command parameters and configuration parameters are shown.
--Example:[user@localhost ~]$ hcp --config-test...
Number of Logical Processors : 2Number of Physical Processors : 2
Command parameters permission : disable recursive : disable anydirs : disable regex : disable verify : disable compress : disable copy-linkfile : disable(don't copy symlink file) follow-linkdir : disable(don't follow symlink directory) dereference-src: disable no-emptyfile : disable(copy) no-emptydir : disable(copy) no-dotfile : disable(copy) no-dotdir : disable(copy) copy-hidden : disable(don't copy) archive-check : disable(don't check archive property) resume : disable no-send : disable no-diskio : disable (0, 0) copy-mode : disable [ALLCOPY] overwrite : disable [FORCE] fail-action : disable [HALT] source-file : disable source-file-host : disable port : disable auto-resume : disable user : disable password : disable version : disable help : disable mcd : -
Target source:
Target destination:
Configuration parameters AtomicLikeSaving : no .tmp NONE [threshold=0] PubkeyAuthentication : yes WinLogonUserAuthentication : yes PAMAuthentication : yes LocalPasswordAuthentication : yes CompressLevel : -1 StrictHostKeyChecking : ask PrivateKeyFile : - [~/.hcp/id_rsa] TransportTimeout : 180 FileLock : no AcceptableCryptMethod : AES256/GCM AES256/CTR/VMAC AES256/CBC AES128/CBC [Intel:AES-NI=yes] AcceptableDigestMethod : XXH3 MM128 SHA256 SHA160
Please type '--config-test --config-test ...' for more details.--
If you want to confirm more detailed configuration options, please add --config-test (other client commands are also in the same manner to show).
#
h, help=========================================================================Supported OS : Linux / WindowsFormat : -h | --help=========================================================================
The help information on the hcp commands is shown.
--Example:[user@localhost ~]$ hcp -h--
#
System Operating Environment Settings#
config-file=========================================================================Supported OS : Linux / WindowsFormat : --config-file=<config-file-path>-------------------------------------------------------------------------config-file-pathDefault : noneRange of Values : path string of file system=========================================================================
The configuration file path used for the hcp command is set.
The hcp commands read the configuration files in the following order.
- /etc/hcp/hcp.conf
- \<user home directory>/.hcp/hcp.conf
- \<the path configured in the options>
When the file doesn’t exist, it is skipped. When the configuration file wasn’t read successfully, file read error occurs and the operation stops.
--Example:[user@localhost ~]$ hcp --config-file=hcp.conf ...--
#
config-option=========================================================================Supported OS : Linux / WindowsFormat : --config-option=<config-file-option-desc>-------------------------------------------------------------------------config-file-option-descDefault : noneRange of Values : description of a configuration item described in configuration files=========================================================================
This option tells the hcp command to apply a configuration item from the command line parameters instead of using configuration files.
The configuration item will be applied at last after other configuration files are loaded.
--Example:[user@localhost ~]$ hcp --config-option="ApplicationLog DEBUG" ...--
#
include-conf-from-cwd=========================================================================Supported OS : Linux / WindowsFormat : --include-conf-from-cwd=========================================================================
When using Include in a relative path on configuration files, this option enables finding a file with a path relative to the current directory where commands run.
#
no-earlier-serv-compat=========================================================================Supported OS : Linux / WindowsFormat : --no-earlier-serv-compat=========================================================================
This option disables the backward compatibility for servers that will be performed when the connecting servers are earlier than the client. This function is available to work if you do not use some functions. This option disables the function works (earlier version’s clients are still available to work with newer version’s servers in that condition). Please see the Server backward compatibility conditions list in the back of this document about what conditions the function works in.