Tar Extract - H3C S6812 Series Command Reference Manual

Hide thumbs Also See for S6812 Series:
Table of Contents

Advertisement

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
test/subtest/
test/subtest/aa.log
Related commands

tar extract

tar list
tar extract
Use tar extract to extract files and directories.
Syntax
tar extract archive-file file [ verbose ] [ screen | to directory ]
Views
User view
Predefined user roles
network-admin
Parameters
archive-file file: Specifies the archive file name. The suffix can be .tar or .tar.gz.
verbose: Displays the names of the successfully extracted files and directories.
screen: Displays the content of the extracted files and directories on the screen. The extracted files
are not saved.
to directory: Saves the extracted files and directories to a different directory. The directory argument
specifies the directory.
Usage guidelines
If you do not specify the screen keyword or the to directory option, the command saves the
extracted files and directories to the working directory.
The command saves the extracted files and directories by using their original names. If a file or
directory that has the same name as an extracted file or directory already exists in the destination
directory, the file or directory is overwritten.
Examples
# Extract files and directories from archive file a.tar.
<Sysname> tar extract archive-file a.tar
Extracting archive flash:/a.tar Done.
# Extract files and directories from archive file a.tar, and display the names of the successfully
extracted files and directories.
<Sysname> tar extract archive-file b.tar.gz verbose
1.cfg
18

Advertisement

Table of Contents
loading

This manual is also suitable for:

S6813 seriesS5150-ei

Table of Contents