Using the Terminal
Using the Terminal Interactively
This chapter describes the basics of how you work with the Terminal in interactive mode. It covers the following topics:
To enter a command in the Terminal, simply type an ObjectScript command and its arguments. Or, if you are using a shell, type a command applicable to that shell.
Note that for ObjectScript, you do not need to enter a space before the command (in contrast to when you define routines and methods).
Also note that if you start a line in the Terminal by pressing Tab
, the rest of that line is entered into the routine buffer and is not executed. This behavior was defined long ago and was a useful way of creating routines. (Also see the ZINSERT
command, which serves the same purpose.) Because customers no longer define routines this way, this documentation does not discuss this feature further.
Whenever active text arrives, the Terminal scrolls the window to the newly arrived text. Use the scroll bar on the right to scroll up or down.
You can also use the keyboard to scroll within the Terminal as follows:
Using the Keyboard to Scroll the Terminal Display
Pausing and Resuming the Terminal Scrolling
To pause the scrolling in Terminal, press Ctrl+S
. While scrolling is paused, the Terminal accepts commands and processes them, but it does not write the commands or any output to the screen (and thus appears to be unresponsive).
Repeating Previous Commands
To repeat a previous command, press the up arrow key repeatedly until the desired command is displayed. To enter the command, press Enter
You can copy and paste text in the Terminal. To do this, you can use the context menu (right-click menu), the Edit
menu, or various keyboard shortcuts. The following options are available:
copies the selected text to the clipboard.
pastes the contents of the clipboard, line by line, to the current position of the cursor (which is the end of the Terminal scrollback buffer). The text becomes visible in the Terminal window unless echoing has been disabled.
Copy + Paste
copies the selected text to the clipboard and then pastes it, line by line, to the current location of the cursor.
You can use the following keyboard shortcuts:
Shortcuts for Copy and Paste
Notes about Copying and Pasting
If the host has a mouse request outstanding and you wish to do a local cut and paste, press Ctrl
while selecting the region; that mouse action is not reported to the host.
If the copied text includes a line boundary, it is saved on the clipboard as a carriage return and a line feed. If you do not want to paste line feeds, see User Settings.
The Terminal can often paste data faster than a host can accept it. See User Settings
for settings to control the speed of pasting. Also, line feeds can be discarded during a paste command.
To print from the Terminal, use the following options of the File
To print the contents of the Terminal screen, select File > Print
To print the log file (or any other ASCII file), select File > Print Log
. This option lets you select the file to print, and it does no special processing except to try to be reasonable in processing form feed characters. During printing, mouse and keyboard input is locked out of the main window and a cancel dialog box appears. Printing is done in draft mode.
menu provides two different options to clear the screen:
To reset the screen, select Edit > Reset
. This option resets the margins, scroll region and other processing on the current page, and causes the Terminal to repaint the window.
To reinitialize the screen, select Edit > Erase
or press Ctrl+Del
. This option reinitializes the Terminal window, erases all session data, and resets the scrollback region to zero.
Logging the Terminal Session
To start logging the Terminal session:
The Terminal displays a dialog box to prompt you for the location and name of the log file. The default directory is install-dir/mgr
. The default filename is CACHETRM.LOG
The total length of the path and file name cannot exceed 126 characters.
Optionally specify a different directory and filename.
If the log file exists, the Terminal asks if you want to overwrite it and presents three choices:
overwrites the file with the new log data
appends any new log data to the file
leaves the file as is (no logging is done)
Later, to stop logging, select File > Logging
or select Alt+L
. The Terminal displays a dialog box to indicate that the log file is closed; select OK
The log file contains only the output from a connection (independent of the current wrap mode).
You can also perform logging from a Terminal script, as described later in this book
. Note that if you have started logging by using File > Logging
, you cannot start a script that also performs logging. If you attempt to do so, the behavior is indeterminate.