137
to
directory-name
: Saves the extracted files and folders to a path.
Usage guidelines
If you do not specify the
screen
keyword or the
to
directory-name
option, the command extracts the
archived files and folders and saves them to the same folder as the archive file.
Examples
# Extract files and folders, and save them to the same folder as the archive file.
<Sysname> tar extract archive-file a.tar.gz
Extracting archive a.tar.gz …… Done.
# Extract files and folders, and display their content on the screen.
<Sysname> tar extract archive-file a.tar.gz verbose screen
a.cfg
#
version 7.1.045, Ess 2106
#
sysname Sysname
#
# Extract files and folders, save them to the same folder as the archive file, and display the names of
the archived files and folders.
<Sysname> tar extract archive-file a.tar.gz verbose
a.txt
# Extract files and folders, and save them to the path
flash:/a
.
<Sysname> tar extract archive-file a.tar.gz to flash:/a
Extracting archive a.tar.gz ......Done.
Related commands
tar create
tar list
tar list
Use
tar list
to display the names of archived files and folders.
Syntax
tar list archive-file
fileurl
-
dest
Views
User view
Predefined user roles
network-admin
mdc-admin
Parameters
archive-file
fileurl
-
dest
: Specifies the archive file name. The suffix can be
.tar
or
.tar.gz
.
Examples
# Display the names of archived files and folders.
<Sysname> tar list archive-file a.tar.gz
a.cfg