![MikroTik RouterOS v2.9 Reference Manual Download Page 105](http://html1.mh-extra.com/html/mikrotik/routeros-v2-9/routeros-v2-9_reference-manual_1794644105.webp)
Description
There are some commands that are common to nearly all menu levels, namely: print, set, remove,
add, find, get, export, enable, disable, comment, move. These commands have similar behavior
throughout different menu levels.
Command Description
print - shows all information that's accessible from particular command level. Thus, /system clock
print shows system date and time, /ip route print shows all routes etc. If there's a list of items in
current level and they are not read-only, i.e. you can change/remove them (example of read-only
item list is /system history, which shows history of executed actions), then print command also
assigns numbers that are used by all commands that operate with items in this list. - applicable only
to lists of items. The action is performed with all items in this list in the same order in which they
are given. - forces the print command to use tabular output form - forces the print command to use
property=value output form - shows the number of items - prints the contents of the specific
submenu into a file. This file will be available in the router's ftp - shows the output from the print
command for every interval seconds - prints the oid value, which is useful for SNMP - prints the
output without paging, to see printed output which does not fit in the screen, use [Shift]+[PgUp]
key combination
It is possible to sort print output. Like this:
[admin@MikroTik] interface> print type=ether
Flags: X - disabled, D - dynamic, R - running
#
NAME
TYPE
RX-RATE
TX-RATE
MTU
0
R isp1
ether
0
0
1500
1
R isp2
ether
0
0
1500
[admin@MikroTik] interface>
set - allows you to change values of general parameters or item parameters. The set command has
arguments with names corresponding to values you can change. Use ? or double [Tab] to see list of
all arguments. If there is a list of items in this command level, then set has one action argument that
accepts the number of item (or list of numbers) you wish to set up. This command does not return
anything.
add - this command usually has all the same arguments as set, except the action number argument.
It adds a new item with values you have specified, usually to the end of list (in places where order is
relevant). There are some values that you have to supply (like the interface for a new route), other
values are set to defaults unless you explicitly specify them. - Copies an existing item. It takes
default values of new item's properties from another item. If you do not want to make exact copy,
you can specify new values for some properties. When copying items that have names, you will
usually have to give a new name to a copy - add command returns internal number of item it has
added - places a new item before an existing item with specified position. Thus, you do not need to
use the move command after adding an item to the list - controls disabled/enabled state of the newly
added item(-s) - holds the description of a newly created item
remove - removes item(-s) from a list - contains number(-s) or name(-s) of item(-s) to remove.
move - changes the order of items in list where one is relevant. Item numbers after move command
are left in a consistent, but hardly intuitive order, so it's better to resync them by using print after
each move command. - first argument. Specifies the item(-s) being moved. - second argument.
Page 91 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.