Chapter 10 Install and System Administration for FortiOS 5.0 : Using the CLI : Sub-commands : Example of table commands
  
Example of table commands
From within the system admin object, you might enter:
edit admin_1
The CLI acknowledges the new table, and changes the command prompt to show that you are now within the admin_1 table:
new entry 'admin_1' added
(admin_1)#
 
Table 62: Commands for fields
abort
Exit both the edit and/or config commands without saving the fields.
append
Add an option to an existing list.
end
Save the changes made to the current table or object fields, and exit the config command. (To exit without saving, use abort instead.)
get
List the configuration of the current object or table.
In objects, get lists the table names (if present), or fields and their values.
In a table, get lists the fields and their values.
move
Move an object within a list, when list order is important. For example, rearranging security policies within the policy list.
next
Save the changes you have made in the current table’s fields, and exit the edit command to the object prompt. (To save and exit completely to the root prompt, use end instead.)
next is useful when you want to create or edit several tables in the same object, without leaving and re-entering the config command each time.
next is only available from a table prompt; it is not available from an object prompt.
select
Clear all options except for those specified.
For example, if a group contains members A, B, C, and D and you remove all users except for B, use the command select member B.
set <field> <value>
Set a field’s value.
For example, in config system admin, after typing edit admin, you could type set password newpass to change the password of the admin administrator to newpass.
Note: When using set to change a field containing a space-delimited list, type the whole new list. For example, set <field> <new‑value> will replace the list with the <new-value> rather than appending <new-value> to the list.
show
Display changes to the default configuration. Changes are listed in the form of configuration commands.
unselect
Remove an option from an existing list.
unset <field>
Reset the table or object’s fields to default values.
For example, in config system admin, after typing edit admin, typing unset password resets the password of the admin administrator account to the default (in this case, no password).
Example of field commands
From within the admin_1 table, you might enter:
set password my1stExamplePassword
to assign the value my1stExamplePassword to the password field. You might then enter the next command to save the changes and edit the next administrator’s table.
See Also
Terminology
Indentation
Notation
Connecting to the CLI
Sub-commands
Permissions
Tips