[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes commands that display or alter the context in which you are working: the current directory, the terminal settings, and so forth. See also the user-related commands in the next section.
19.1 pwd
: Print working directoryPrint working directory. 19.2 stty
: Print or change terminal characteristicsPrint or change terminal characteristics. 19.3 printenv
: Print all or some environment variablesPrint environment variables. 19.4 tty
: Print file name of terminal on standard inputPrint file name of terminal on standard input.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
pwd
: Print working directory
pwd
prints the fully resolved name of the current directory.
That is, all components of the printed name will be actual directory
names--none will be symbolic links.
Because most shells have a built-in command by the same name, using the unadorned command name in a script or interactively may get you different functionality than that described here.
The only options are a lone `--help' or `--version'. See section 2. Common options.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
stty
: Print or change terminal characteristics
stty
prints or changes terminal characteristics, such as baud rate.
Synopses:
stty [option] [setting]... stty [option] |
If given no line settings, stty
prints the baud rate, line
discipline number (on systems that support it), and line settings
that have been changed from the values set by `stty sane'.
By default, mode reading and setting are performed on the tty line
connected to standard input, although this can be modified by the
`--file' option.
stty
accepts many non-option arguments that change aspects of
the terminal line operation, as described below.
The program accepts the following options. Also see 2. Common options.
O_NONDELAY
flag to
prevent a POSIX tty from blocking until the carrier detect line is high if
the clocal
flag is not set. Hence, it is not always possible
to allow the shell to open the device in the traditional manner.
stty
command to restore the current settings. This option
may not be used in combination with any line settings.
Many settings can be turned off by preceding them with a `-'. Such arguments are marked below with "May be negated" in their description. The descriptions themselves refer to the positive case, that is, when not negated (unless stated otherwise, of course).
Some settings are not available on all POSIX systems, since they use extensions. Such arguments are marked below with "Non-POSIX" in their description. On non-POSIX systems, those or other settings also may not be available, but it's not feasible to document all the variations: just try it and see.
19.2.1 Control settings 19.2.2 Input settings 19.2.3 Output settings 19.2.4 Local settings 19.2.5 Combination settings 19.2.6 Special characters 19.2.7 Special settings
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
stop
character when the system input buffer
is almost full, and start
character when it becomes almost
empty again. May be negated.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These arguments specify output-related operations.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
interrupt
, quit
, and suspend
special
characters. May be negated.
erase
, kill
, werase
, and rprnt
special characters. May be negated.
erase
characters as backspace-space-backspace. May be
negated.
kill
character. May be negated.
interrupt
and quit
special
characters. May be negated.
icanon
is set.
Non-POSIX. May be negated.
kill
special character by erasing each character on
the line as indicated by the echoprt
and echoe
settings,
instead of by the echoctl
and echok
settings. Non-POSIX.
May be negated.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
parenb -parodd cs7
. May be negated. If negated, same
as -parenb cs8
.
parenb parodd cs7
. May be negated. If negated, same
as -parenb cs8
.
-icrnl -onlcr
. May be negated. If negated, same as
icrnl -inlcr -igncr onlcr -ocrnl -onlret
.
erase
and kill
special characters to their default
values.
cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke |
brkint ignpar istrip icrnl ixon opost isig icanon
, plus
sets the eof
and eol
characters to their default values
if they are the same as the min
and time
characters.
May be negated. If negated, same as raw
.
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon -xcase min 1 time 0 |
cooked
.
-icanon
. May be negated. If negated, same as
icanon
.
-parenb -istrip cs8
. May be negated. If negated,
same as parenb istrip cs7
.
-parenb -istrip -opost cs8
. May be negated.
If negated, same as parenb istrip opost cs7
.
-ixany
. Non-POSIX. May be negated.
tab0
. Non-POSIX. May be negated. If negated, same
as tab3
.
xcase iuclc olcuc
. Non-POSIX. May be negated.
echoe echoctl echoke
.
echoe echoctl echoke -ixany intr ^C erase ^? kill C-u
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The special characters' default values vary from system to system. They are set with the syntax `name value', where the names are listed below and the value can be given either literally, in hat notation (`^c'), or as an integer which may start with `0x' to indicate hexadecimal, `0' to indicate octal, or any other digit to indicate decimal.
For GNU stty, giving a value of ^-
or undef
disables that
special character. (This is incompatible with Ultrix stty
,
which uses a value of `u' to disable a special character. GNU
stty
treats a value `u' like any other, namely to set that
special character to U.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-icanon
is set.
-icanon
is set.
LINES
and COLUMNS
instead; however, GNU stty
does not know anything about them.)
Non-POSIX.
exta
extb
. exta
is the same as
19200; extb
is the same as 38400. 0 hangs up the line if
-clocal
is set.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
printenv
: Print all or some environment variables
printenv
prints environment variable values. Synopsis:
printenv [option] [variable]... |
If no variables are specified, printenv
prints the value of
every environment variable. Otherwise, it prints the value of each
variable that is set, and nothing for those that are not set.
The only options are a lone `--help' or `--version'. See section 2. Common options.
0 if all variables specified were found 1 if at least one specified variable was not found 2 if a write error occurred |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
tty
: Print file name of terminal on standard input
tty
prints the file name of the terminal connected to its standard
input. It prints `not a tty' if standard input is not a terminal.
Synopsis:
tty [option]... |
The program accepts the following option. Also see 2. Common options.
0 if standard input is a terminal 1 if standard input is not a terminal 2 if given incorrect arguments 3 if a write error occurs |
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |