h5copy [OPTIONS] [OBJECTS]
h5copy
copies an HDF5 object (a dataset, named datatype, or group)
from an input HDF5 file to an output HDF5 file.
If a group is specified as the input object, any objects in that group will be recursively copied.
The output file may or may not already exist.
h5copy
will fail if the destination object name
already exists.
-h
or
--help
-v
or
--verbose
-V
or
--Version
-p
or
--parents
-f flag_type
or
--flag=flag_type
flag_type
may be one of the following strings
or a logical AND of two or more:
shallow |
Copy only immediate members of a group.
(Default: Recursively copy all objects below the group.) |
soft |
Expand soft links to copy target objects.
(Default: Keep soft links as they are.) |
ext |
Expand external links to copy external objects.
(Default: Keep external links as they are.) |
ref |
Copy references and any referenced objects,
i.e., objects that the references point to.
Referenced objects are copied in addition to the objects specified on the command line and reference datasets are populated with correct reference values. Copies of referenced datasets outside the copy range specified on the command line will normally have a different name from the original. (Default:Without this option, reference value(s) in any reference datasets are set to NULL and referenced objects are not copied unless they are otherwise within the copy range specified on the command line.) |
attr |
Copy objects without copying attributes.
(Default: Copy objects and all attributes.) |
allflags |
Switch each setting above from the default
to the setting described in this table.
Equivalent to logical AND of all flags above. |
-i input_file
or
--input=input_file
-o output_file
or
--output=output_file
-s source_object
or
--source=source_object
-d destination_object
or
--destination=destination_object
0 | Succeeded. |
>0 | An error occurred. |
test1.out.h5
,
containing the object array
in the root group,
copied from the existing file test1.h5
and object array
.
h5copy -v -i "test1.h5" -o "test1.out.h5" -s "/array" -d "/array
In verbose mode and using the flag shallow
to prevent recursion in the file hierarchy,
create a new file, test1.out.h5
,
containing the object array
in the root group,
copied from the existing file test1.h5
and object array
.
h5copy -v -f shallow -i "test1.h5" -s "/array" -o test1.out.h5" -d "/array"
Release | Command Line Tool |
1.8.0 | Tool introduced in this release. |
1.8.7 | Tool updated to accept same file as input file and as output file. |