-->
Previous Table of Contents Next


FORMATS

%a Abbreviates the day of the week (Sun, Mon, etc.).
%A Spells out the day of the week (Sunday, Monday, etc.).
%b Abbreviates the month (Jan, Feb, etc.). The same as %h.
%B Spells out the month (January, February, etc.).
%c Returns the time for a specific country.
%d Returns the day in two digits (01–31).
%D Returns the date in mm/dd/yy format.
%e Returns the day as a numeral (1–31).
%h Abbreviates the month (Jan, Feb, etc.). The same as %b.
%H Returns the hour in military time (00–23).
%I Returns the hour in nonmilitary time (00–12).
%j Returns the date in Julian format (1–365).
%k Returns the hour in military time, without leading zeroes (1-23).
%l Returns the hour in nonmilitary time, without leading zeroes (1–12).
%m> Returns the month as two numerals (01 for January, 02 for February, etc.).
%M Returns the number of minutes (0–59).
%n Inserts a newline.
%p Changes time of day to a.m. and p.m. (as opposed to the default AM and PM.
%r Returns hh:mm:ss:a/pm in 12-hour format.
%s Returns the number since “The Epoch,” 1970-01-01 00:00:00 UTC.
%S Returns the number of seconds (0–59).
%t Inserts a tab.
%T Specifies time returns in the hh:mm:ss format.
%U Returns the day of the month (01–31).
%w Returns the day of the week as a numeral (Sunday is 0).
%W Returns the week as a number (0–51), with the week beginning on a Monday.
%x Returns a country-specific time format.
%X Returns a country-specific date format.
%y Returns the year in two digits (97).
%Y Returns the year in four digits (1997).
%Z Returns a time-zone name.

DATE-SETTING OPTIONS

A privileged user can also use the date command to set a system date. The date can be numeric or nonnumeric format. A numeric string must be in the format Mmddhhmmyy.

EXAMPLE


$ date 0101153097

This sets the date to January 1 (0101), 1997 (97), at 3:30 p.m. (1530).

dumpkeys......Keyboard Information

dumpkeys option(s)

PURPOSE

The dumpkeys command returns information about the current keyboard driver.

OPTIONS

-ccharset Specifies a charset to interpret the returned values; charset must be iso-8859-1 (ASCII English; the default), iso-8859-2, iso-8859-3, iso-8859-4, or iso-8859-8.
--compose-only Returns information about key combinations.
-f Prints the entire output for each key in canonical format.
--funcs-only Returns information about function keys.
-i Prints limited information about each key: acceptable keycode
keywords, the number of actions that can be bound to a key, the ranges of the action codes, and the number of function keys supported by the Linux kernel.
--keys-only Returns information about key bindings, not string definitions.
-l Prints information about each key: acceptable keycode keywords, the number of actions that can be bound to a key, the ranges of the action codes, the number of function keys supported by the Linux kernel, and the supported action symbols and their numeric values.
-n Returns information in hexadecimal format.

echo......Echoes Input

echo option string

PURPOSE

The echo command echoes text or a value to standard output, normally the screen. It actually exists in three versions: as a Linux command (/bin/echo), as a C shell command, and as a Bourne shell command. The three are used interchangeably. The only real difference is that the C shell version is much more limited not supporting control characters and the -n option, as they are here.

OPTION

-n Avoids printing of a newline at the end of the text.

CONTROL CHARACTER

\a Alert (bell).
\b Backspace.
\c No newline.
\f Form feed.
\n Newline.
\r Carriage return.
\t Horizontal tab.
\v Vertical tab.
\\ Backslash.
\nnn ASCII code of any character.

EXAMPLE


$ echo “Good afternoon!”

This prints the string Good afternoon! to the screen.


$ echo “We are testing the printer” | lp

This sends the string We are testing the printer to the printer.

env......Set Environment

env option [variable=value] command

PURPOSE

The env command changes environment variables or displays the current environment variables with their values. Your Linux system has a set of variables that can be applied to various situation; for instance, instead of every command and program having its own text editor, most of them just summon the EDITOR environment variable and call a system editor. Other variables control the default shell, your terminal type, your command path, and your home directory.

OPTIONS

- Ignores the current environment entirely.
-i Ignores the current environment entirely.
u variable Unsets the specified var.

fsinfo......Font Server Info

fsinfo -server servername

PURPOSE

The fsinfo command returns information about a running X Window System font server.

RELATED COMMANDS

fslsfonts
xfs


Previous Table of Contents Next