Shell Commands/Resident

From MorphOS Library

< Shell Commands

Resident - Adds or Removes a command in memory

NAME, FILE, ALIAS/K, REMOVE/S, ADD/S, REPLACE/S, PURE=FORCE/S, SYSTEM/S,DEFER/S

NAME    - Name of the resident to be added into the resident list              
FILE    - Full path to the executable to add
ALIAS   - Add an Alias of an existing resident cmd instead of a new one
REMOVE  - Deactivates the specified internal command
REPLACE - Default option
ADD     - Use this option to override REPLACEment and make
          several versions of a command resident simultaneously,
          use the ADD option, giving a different NAME for each version loaded.
PURE    - Forces Resident to load commands that are not marked as pure
          and use them to test the pureness of other commands and programs.
          Use the PURE option with caution. Be sure the programs that you
          make Resident meet the criteria to be resident or be careful
          to use the command in only one process at a time.
SYSTEM  - Add the specified command in the System portion of the list
          The command then becomes available as a system component and
          cannot be removed from the list
DEFER   - Command is loaded to RAM when it's used for the first time

Resident with no FILE argument will display the resident list. You can specify the SYSTEM argument to show only System components.

NOTE: To be made resident, a command should be pure, meaning that it is both re-entrant and re-executable. A re-entrant command can properly support independent use by two or more programs at the same time. A re-executable command does not have to be reloaded to be executed again. Commands that have these characteristics are called 'pure' and have the p (pure) protection bit set.