Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

HISTORY Internal
Purpose: Display, recall or store the command line history.
Format: HISTORY [[LINES] <number>] [START <number>] [LOAD <file name>] [SAVE <file name>] [SIZE <number>] [CLEAR] [SHOW] [NONUM]
Path: Internal
HISTORY can be used to show the past command line history, to save it to a file or load it from a file. If no other options are specified, it will show the command line history, each line prefixed by a number.

To restrict the number of history lines shown, use the [LINES]  <number> argument; the default is to list all history lines, starting with the first one.

To start the listing with a different line, use the START  <number> argument.

Each line will be prefixed by a number; to ignore the number, use the NONUM option.

The command history can be stored in or loaded from a file. To do either, specify the name of the file to be used with the SAVE  <file name> or LOAD  <file name> arguments. These arguments can be combined: the history command will always perform the SAVE argument first before it performs the LOAD argument. Note that the command line history will be added to the current list if loaded with the LOAD argument unless you use the CLEAR option as well. Used all by itself, the CLEAR option will drop the current command line history.

The SIZE  <number> argument controls the size of the command line history buffer which by default has room for about four complete command lines of maximum length. Changing the size tries to retain the contents of the current command line history buffer.

Example 1:

   2 DATE
lists the current command line history, starting with the first line, printing all lines in the buffer. In this example you can see that the STATUS and DATE commands were issued prior to the HISTORY command.

Example 2:

3.OS4:> HISTORY LINES 5 START 3 lists five lines of command line history, starting with the third line. If fewer lines are stored in the buffer, fewer will be printed.

Example 3:

3.OS4:> HISTORY SAVE old-history LOAD new-history CLEAR saves the current command line history in the file 'old-history', then clears the history buffer and eventually loads the command line history from the file 'new-history'. Note that if either the save or the load command fails no changes will be made to the contents of the current history buffer.

Example 4:

3.OS4:> HISTORY SIZE 16 sets the maximum size of the history buffer to about 8,000 characters.

Example 5:

3.OS4:> HISTORY START -2 LINES 1 NONUM displays the last command line entered (preceding the 'HISTORY START -2 LINES 1 NONUM' command).

Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.

Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: February 9, 2006.