Terminal utilities#
This section consists of quick references for the various functions/utilities that can be leveraged when interacting with Scrutinizer via command line.
See also
See this page for documentation for Scrutinizer’s interactive command-line utility (scrut_util).
Tmux#
When running a script or operation that may take a significant amount of time (e.g., upgrades, migrations, etc.), it is strongly recommended to do so within a tmux session.
Frequently used tmux commands/actions:
Starting a new tmux session (with an optional SESSION_NAME and/or WINDOW_NAME)
tmux new [-s SESSION_NAME] [-n WINDOW_NAME]
Terminating the current (or a specified) tmux session:
tmux kill-ses [-t SESSION_NAME]
Connecting/attaching to the last (or a specified) tmux session:
tmux at [-t SESSION_NAME]
When running a script or operation, it can be also be helpful to create a new window or pane where the log file can be tailed using less (see below).
Window shortcuts
Create new window |
Ctrl + B, C |
Previous/next window |
Ctrl + B, P/N |
Switch to specified window number |
Ctrl + B, 0-9 |
Close current window |
Ctrl + B, & |
Pane shortcuts
Split current window into left/right panes |
Ctrl + B, % |
Split current window into top/bottom panes |
Ctrl + B, “ |
Toggle between pane layouts |
Ctrl + B, Spacebar |
Switch to pane in the specified direction |
Ctrl + B, Arrow key |
Close current pane |
Ctrl + B, X |
less#
When running a migration, upgrade, or other operation in a tmux session, the log file can be tailed using less in a different window or pane:
less [-i] <PATH/FILENAME>
Note
Less searches are case-sensitive by default. The -i option toggles on case-insensitive searches.
Less shortcuts
Tail file |
Shift + F |
Stop tailing |
Ctrl + C |
Navigate forward by one screen |
Ctrl + F |
Navigate backward by one screen |
Ctrl + B |
Go to end of file |
Shift + G |
Search forwards for |
/ |
Search backwards for |
? |
Next search match |
n |
Previous search match |
N |
Filter for |
& |
Filter out |
! |