Previous Table of Contents Next


COMMANDS

: null command; returns zero exit status
. file read and execute the commands in file in the current environment
break exit from the current enclosing for, select, until, or while loop
break n exit from the nth enclosing for, select, until, or while loop
cd dir change directory to dir. If dir not specified, change directory to $HOME.
cd dir1 dir2 change to directory where dir1 in the current pathname is substituted with dir2
cd – change directory to the previous directory
echo args display arguments
eval commands read and execute commands
exec I/O-redirection-command perform I/O redirection on file descriptors
exec command replace current process with command
exit exit from the current program with the exit status of the last command. If given at the command prompt terminate the login shell.
exit n exit from the current program with exit status n
export display a list of exported variables
export var=value set var to value and export
export vars export vars
false return a non-zero exit status
fc –l[options] [range] display range commands from the history file according to options. If no range argument is given, display the last 16 commands. Options can be:
–n do not display command numbers
–r reverse the order (latest commands first)
and range can be:
n1 [n2] display list from command n1 to command n2. If n2 is not specified, display all commands from current command back to command n1.
count display the last count commands
string display all the previous commands back to the command that matches string
fc [options] [range] edit and re-execute range commands from the history file according to options. If no range argument is given, edit and re-execute the last command. Options can be:
–e editor use the specified editor (default FCEDIT or /bin/ed)
–r reverse the order (latest commands first)
and range can be:
n1 n2 edit command n1 to command n2
n edit command n
n edit previous nth command
string use all the previous commands back to the command that matches string
fc –e – [old=new] [command] edit and re-execute command where old=new specified to replace the string old with new before executing. If no command argument is given, use the last command. The command can be given as:
n edit and re-execute command number n
n edit and re-execute the last nth command
string edit and re-execute the most previous command that matches string
getopts optsring name arguments parse arguments, using optstring as the list of valid options; save the option letter in name
getopts optsring name parse positional parameters, using optstring as the list of valid options; save the option letter in name
newgrp change the group-id to the default group-id
newgrp gid change group id to gid
pwd display pathname of current directory
readonly display a list of readonly variables
readonly var set var to be readonly
readonly var=value set var to value and make it readonly
set display a list of current variables and their values
set –o display current option settings
set args set positional parameters
set –args set positional parameters even if they begin with
set –s sort positional parameters
set –– unset positional parameters
shift shift the positional parameters once to the left
shift n shift the positional parameters n times to the left
test expression evaluate expression
time command display the elapsed, user, and system time spent executing command
times display the total user and system time for the current Korn shell and its child processes
trap commands signals execute commands when signals are received
trap "" signals ignore signals
trap signals, trap –signals reset traps to their default values
trap commands 0, trap commands EXIT execute commands on exit
trap display a list of current traps
trap commands DEBUG execute commands after each command is executed
trap commands ERR if the errexit (–e) option is enabled, then execute commands after commands that have a non-zero exit status
true return a non-zero exit status
typeset display a list of current variables and their values
ulimit [options] n set a resource limit to n. If n is not given, the specified resource limit is displayed. If no option is given, the file size limit (–f) is displayed.
–a displays all the current resource limits
–c n set the core dump size limit to n 512-byte blocks
–d n set the data area size limit to n kilobytes
–f n set the child process file write limit to n 512-byte blocks (default)
–m n set the physical memory size limit to n kilobytes
–s n set the stack area size limit to n kilobytes
–t n set the process time limit to n seconds
umask display the current value of the file creation mask
umask mask set the default file creation mask to mask
unset var remove the definition of var
whence name display information about name
whence –v name display more information about name


Previous Table of Contents Next
1