Tar Create - HPE D6020 Maintenance And Service Manual

Hide thumbs Also See for HPE D6020:
Table of Contents

Advertisement

Parameters
file: Specifies the name of a file.
Usage guidelines
You can use file digests to verify file integrity.
Examples
# Use the SHA-256 algorithm to calculate the digest of file system.bin.
<Sysname> sha256sum system.bin
SHA256 digest:
0851e0139f2770e87d01ee8c2995ca9e59a8f5f4062e99af14b141b1a36ca152

tar create

Use tar create to archive files and directories.
Syntax
tar create [ gz ] archive-file dest-file [ verbose ] source { source-file | source-directory }&<1-5>
Views
User view
Predefined user roles
network-admin
Parameters
gz: Uses gzip to compress the files and directories before archiving them. If you do not specify this
keyword, the command archives the files and directories without compressing them.
archive-file dest-file: Specifies the archive file name. If you specified the gz keyword, the suffix of
the archive file name must be .tar.gz. If you did not specify the gz keyword, the suffix of the archive
file name must be .tar.
verbose: Displays the names of the successfully archived files and directories. If you do not specify
this keyword, the command does not display the names of the successfully archived files and
directories.
source { source-file | source-directory }&<1-5>: Specifies the files and directories to be archived.
The argument can be a space-separated list of up to five items. Each item can be a file or directory
name.
Examples
# Archive files 1.cfg, 2.cfg, and directory test to file a.tar.
<Sysname> tar create archive-file a.tar source 1.cfg 2.cfg test
Creating archive flash:/a.tar Done.
# Compress and archive files 1.cfg, 2.cfg, and directory test to b.tar.gz.
<Sysname> tar create gz archive-file b.tar.gz source 1.cfg 2.cfg test
Creating archive flash:/b.tar.gz Done.
# Compress and archive files and directories, and display the successfully archived files and
directories.
<Sysname> tar create gz archive-file c.tar.gz verbose source 1.cfg 2.cfg test
1.cfg
2.cfg
test/
test/a.log
174

Advertisement

Table of Contents
loading

Table of Contents