5
If the specified file does not exist, the system creates the file and saves the output to the file. If the file
already exists, the system overwrites the file.
Examples
# Save VLAN 1 settings to a separate file named
vlan.txt
.
<Sysname> display vlan 1 > vlan.txt
# Verify the content of the
vlan.txt
file.
<Sysname> more vlan.txt
VLAN ID: 1
VLAN type: Static
Route interface: Not configured
Description: VLAN 0001
Name: VLAN 0001
Tagged ports: None
Untagged ports:
FortyGigE1/0/2
display >>
Use
display
>>
to append the output from a
display
command to the end of a file.
Syntax
display
command
>>
filename
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
command
: Specifies the keywords and arguments of a
display
command. To display available keywords
and arguments, enter
display ?
.
filename
: Specifies the name of the file that is used to save the output, a string of 1 to 63 characters.
Usage guidelines
The
display
commands show the configuration, statistics, and states of the device. You can use
display
>>
to save the output to a file.
If the specified file does not exist, the system creates the file and saves the output to the file. If the file
already exists, the system appends the output to the end of the file.
Examples
# Append the VLAN 999 settings to the end of the
vlan.txt
file.
<Sysname> display vlan 999 >> vlan.txt
<Sysname>
# Check the content of the
vlan.txt
file.
<Sysname> more vlan.txt
VLAN ID: 1