130
Usage guidelines
The digest can be used to verify the integrity of the file. For example, you can use this command to
calculate the digest of a software image file and compare it with that provided on the HP website to
identify whether the file has been tampered with.
Examples
# Use the SHA-256 algorithm to calculate the digest of file
system.bin
.
<Sysname> sha256sum system.bin
SHA256 digest
:
0851e0139f2770e87d01ee8c2995ca9e59a8f5f4062e99af14b141b1a36ca152
Related commands
md5sum
tar create
Use
tar create
to archive files and folders.
Syntax
tar create
[
gz
]
archive-file
fileurl
-
dest
[
verbose
]
source
fileurl
-
source-list
&<1-5>
Views
User view
Predefined user roles
network-admin
Parameters
gz
: Uses gzip to compress the files and folders before archiving them.
archive-file
fileurl
-
dest
: Specifies the archive file name. If you specified the
gz
keyword, the suffix of this
argument must be
.tar.gz
. If you did not specify the
gz
keyword, the suffix of this argument must be
.tar
.
verbose
: Displays the names of the successfully archived files and folders.
source
fileurl
-
source-list
&<1-5>: Specifies the files and folders to be archived. The
fileurl
-
source-list
argument can be a space-separated list of up to five items. Each item can be a file or folder name.
Examples
# Archive file
a.cfg
to file
a.tar
.
<Sysname> tar create archive-file a.tar source a.cfg
Creating archive a.tar …… Done.
# Compress file
a.cfg
and archive the file to
a.tar.gz
.
<Sysname> tar create gz archive-file a.tar.gz source a.cfg
Creating archive a.tar.gz Done.
# Compress and archive files and folders, and display the successfully archived files and folders.
<Sysname> tar create gz archive-file a.tar.gz verbose source a.cfg a.dbm ./core
a.cfg
a.dbm
./core