Commands

: null command; returns zero exit status
. file read and execute commands in file
break exit from current enclosing for, select, until, or while loop
break n exit from nth enclosing for, select, until, or while loop
cd dir change directory to dir(default $HOME)
cd dir1 dir2 change to directory where dir1 in current pathname is substituted with dir2
cd – change directory to previous directory
echo args display arguments
eval cmds 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 current program with exit status of the last command. If given at command prompt, terminate the login shell.
exit n exit from current program with exit status n
export display list of exported variables
export var=val set var to value and export
export vars export vars
false return non-zero exit status
fc –l[options] [range] display range commands from history file according to options. If no range argument given, display last 16 commands.Options can be:
–n do not display command numbers
–r reverse order (latest commands first)
and range can be:
n1 [n2] display list from command n1 to command n2. If n2 not specified, display all commands from current command back to command n1.
count display last count commands
string display all previous commands back to command that matches string

fc [options] [range] edit and re-execute range commands from history file according to options. If no range argument given, edit and re-execute last command. Options can be:
–e editor use specified editor (default FCEDIT or / bin/ed)
–r reverse 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 string old with new before executing. If no command argument is given, use last command. The command can be given as:
n edit and re-execute command number n
n edit and re-execute last nth command
string edit and re-execute most previous command that matches string

getopts optsring name arguments parse arguments, using optstring as list of valid options; save option letter in name
getopts optsring name parse positional parameters, using optstring as list of valid options; save option letter in name
newgrp change group-id to 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 list of current variables and their values
set –o display current option settings
set args set positional parameters
set –args set positional parameters that begin with
set –s sort positional parameters
set – – unset positional parameters
shift shift positional parameters once left
shift n shift positional parameters n times left
test expression evaluate expression
time command display elapsed, user, and system time spent executing command
times display total user and system time for 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 errexit (–e) option enabled, 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 given, file size limit (–f) is displayed.
–a displays all current resource limits
–c n set core dump size limit to n 512-byte blocks
–d n set data area size limit to n kilobytes
–f n set child process file write limit to n 512-byte blocks (default)
–m n set physical memory size limit to n kilobytes
–s n set stack area size limit to n kilobytes
–t n set process time limit to n seconds

umask display current file creation mask value
umask mask set default file creation mask to mask
unset var remove definition of var
whence name display information about name
whence –v name display more information about name

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.172.38