Vous êtes sur la page 1sur 13

WHO

Lists who is logged on your machine

The Single Unix Specification (SUS) specifies that who should list information
about accessible users. The XSI extension also specifies that the data of the
username, terminal, login time, process ID, and time since last activity occurred
on the terminal, furthermore, an alternate system database used for user
information can be specified as an optional argument to who.

The command can be invoked with the arguments am i or am I (so it is invoked


as who am i or who am I), showing information about the current terminal.

ALIAS
An alias will last for the life of the shell session. Regularly used aliases can be set
from the shell's configuration file ( ~/.cshrc or the systemwide /etc/csh.cshrc for
csh, or ~/.bashrc or the systemwide /etc/bashrc or /etc/bash.bashrc for bash)
so that they will be available upon the start of the corresponding shell session.
The alias commands may either be written in the config file directly or SOURCE
from a separate file, typically named .alias (or .alias-bash, .alias-csh, etc., if
multiple shells may 1be used).

Non-persistent aliases can be created by supplying name/value pairs as


arguments for the alias command. In Unix shells the syntax is:

ALIAS copy='cp'

HISTORY

The various Unix shells maintain a record of the commands issued by the user
during the current session. The history command manipulates this history list. In
its simplest form, it prints the history list. Options allow for the recall and editing
of particular commands and for setting parameters such as the number of past
commands to retain in the list.

In early versions of Unix the history command was a separate program. However,
most shells have long included the history command as a shell built-in, so the
separate program is no longer in common use. Since most current history
commands are shell built-ins, details depend on the choice of Unix shell.

XCALC
xcalc - scientific calculator for X
xcalc is a scientific calculator desktop accessory that can emulate a
TI-30 or an HP-10C.
xcalc [-stipple] [-rpn] [-toolkitoption...]
Pointer Usage: Operations may be performed with pointer button 1, or in
some cases, with the keyboard. Many common calculator operations have
keyboard accelerators. To quit, press pointer button 3 on the AC key
of the TI calculator, or the ON key of the HP calculator.

Calculator Key Usage (TI mode): The numbered keys, the +/- key, and the
+, -, *, /, and = keys all do exactly what you would expect them to.
It should be noted that the operators obey the standard rules of prece-
dence. Thus, entering "3+4*5=" results in "23", not "35". The paren-
theses can be used to override this. For example, "(1+2+3)*(4+5+6)="
results in "6*15=90".

The entire number in the calculator display can be selected, in order


to paste the result of a calculation into text.

The action procedures associated with each function are given below.
These are useful if you are interested in defining a custom calculator.
The action used for all digit keys is digit(n), where n is the corre-
sponding digit, 0..9.

FORTUNE

Fortune is a simple program that displays a pseudorandom message from a


database of quotations that first appeared in Version 7 Unix.[1] The most common
version on modern systems is the BSD fortune , originally written by Ken Arnold.
Distributions of fortune are usually bundled with a collection of themed files,
containing sayings like those found on fortune cookies (hence the name),
quotations from famous people, jokes, or poetry.

fortune is predominantly found on Unix-like systems, but clients for other


platforms also exist. Often, users on text-mode Unix terminals will place this
command into either their .profile or .logout files to display them at logon and
logout, respectively. It is also used to generate text input for
certain XScreenSaver modes. Many people choose to pipe fortune into
the cowsay command, to add more humor to the dialog.

Several common options exist that change the way command-line versions of fortune behave:

Option Action

-a Choose from all databases, regardless of whether they are considered


"offensive" or not
-e Make the probability of choosing a fortune file equal to that of all other files

-f Print out a list of all fortune files that would have been searched, but do not
print a fortune

-i When used with -m , make regular expression searching case-insensitive

Use only quotations longer than the length specified with -n , or 160
-l
characters if -n is not used

-m [patter
Print all fortunes matching the regular expression specified in [pattern]
n]

-n [length Override the length used by -l and -s to determine "long" and "short"
] messages (default 160 characters)

-o Choose only from "offensive" databases

Use only quotations shorter than the length specified with -n , or 160
-s
characters if -n is not used

-w Wait for a period of time before terminating; useful for situations in which a
fortune needs to be read before the screen is cleared

DF
df (abbreviation for disk free) is a standard Unix command used to display the
amount of available disk space for file systems on which the invoking user has
appropriate read access. df is typically implemented using the statfs or statvfs
system calls.

The Single UNIX Specification specifications for df are:

df [-k] [-P|-t] [-del] [file...]

-k
Use 1024-byte units, instead of the default 512-byte units, when writing
space figures.
-P
Use a standard, portable, output format
-t
If XSI compliant, show allocated space as well[dubious discuss]
-h
Display in KB, MB, or GB

DU
du (abbreviated from disk usage) is a standard Unix program used to estimate
file space usagespace used under a particular directory or files on a file
system.

By default, the Single UNIX Specification (SUS) specifies that du is to display the
file space allocated to each file and directory contained in the current directory.
Links will be displayed as the size of the link file, not what is being linked to; the
size of the content of directories is displayed, as expected.

As du reports allocation space and not absolute file space, the amount of space
on a file system shown by du may vary from that shown by df if files have been
deleted but their blocks not yet freed. Also the minfree setting that allocates
datablocks for the filesystem and the super user processes creates a discrepancy
between total blocks and the sum of used and available blocks. The minfree
setting is usually set to about 5% of the total filesystem size.

EXIT

exit is a command used in many operating system command


line shells and scripting languages. The command causes the shell or program
to terminate. If performed within an interactive command shell, the user is
logged out of their current session, and/or user's
current console or terminal connection is disconnected. Typically an optional exit
code can be specified, which is typically a simple integer value that is then
returned to the parent process. Scripting languages providing this command
include sh, ksh, Perl, AWK, PHP, TCL, and others.

TOP
The top program provides a dynamic real-time view of a running system. It can
display system summary information as well as a list of taskscurrently being
managed by the Linux kernel. The types of system summary information shown
and the types, order and size of information displayed for tasks are all user
configurable and that configuration can be made persistent across restarts.

The program provides a limited interactive interface for process manipulation as


well as a much more extensive interface for personal
configuration -- encompassing every aspect of its operation. And while top is
referred to throughout this document, you are free to name the program
anything you wish. That new name, possibly an alias, will then be reflected on
tops display and used when reading and writing a configuration file.

Tr
tr - translate or delete characters

Translate, squeeze, and/or delete characters from standard input, writing to


standard output.

Tag Description

-c, -C, --complement

first complement SET1

-d, --delete

delete characters in SET1, do not translate

-s, --squeeze-repeats

replace each input sequence of a repeated character that


is listed in SET1 with a single occurrence of that character

-t, --truncate-set1

first truncate SET1 to length of SET2

--help display this help and exit

--version
output version information and exit

SETs are specified as strings of characters. Most represent themselves.


Interpreted sequences are:

\NNN character with octal value NNN (1 to 3 octal digits)

\\ Backslash

\a audible BEL

\b Backspace

\f form feed

\n new line

\r Return

\t horizontal tab

\v vertical tab

CHAR1-CHAR2

all characters from CHAR1 to CHAR2 in ascending order

[CHAR*]

in SET2, copies of CHAR until length of SET1

[CHAR*REPEAT]

REPEAT copies of CHAR, REPEAT octal if starting with 0

[:alnum:]

all letters and digits

[:alpha:]

all letters

[:blank:]

all horizontal whitespace

[:cntrl:]

all control characters

[:digit:]

all digits

[:graph:]

all printable characters, not including space


[:lower:]

all lower case letters

[:print:]

all printable characters, including space

[:punct:]

all punctuation characters

[:space:]

all horizontal or vertical whitespace

[:upper:]

all upper case letters

[:xdigit:]

all hexadecimal digits

[=CHAR=]

all characters which are equivalent to CHAR


Translation occurs if -d is not given and both SET1 and SET2 appear. -t may be
used only when translating. SET2 is extended to length of SET1 by repeating its
last character as necessary. Excess characters of SET2 are ignored. Only [:lower:]
and [:upper:] are guaranteed to expand in ascending order; used in SET2 while
translating, they may only be used in pairs to specify case conversion. -s uses
SET1 if not translating nor deleting; else squeezing uses SET2 and occurs after
translation or deletion.

FOLD
fold - wrap each input line to fit in specified width.

Wrap input lines in each FILE (standard input by default), writing to standard
output.

Mandatory arguments to long options are mandatory for short options too.

Tag Description

-b, --bytes

count bytes rather than columns

-c, --characters
count characters rather than columns

-s, --spaces

break at spaces

-w, --width=WIDTH

use WIDTH columns instead of 80

--help display this help and exit

--version

output version information and exit

KILL

The default signal for kill is TERM (which will terminate or "kill" the process).
Use -l or -L to list available signals. Particularly useful signals include HUP, INT,
KILL, STOP, CONT, and 0. Alternate signals may be specified in three ways: -9, -
SIGKILL or -KILL. Negative PID (process ID) values may be used to choose
whole process groups; see the PGID column in the output of the ps command. A
PID of -1 is special; it indicates all processes except two: the kill process itself,
and init.
pid [...] Send a signal to every pid listed.
-signal, Specify the signal to be sent. The signal can be specified by using name or numbe
-s signal, signals, and their identifying names, are listed on our signals page.
--signal sig
nal
-l, --list List signal names. This option has optional argument, which will convert signal num
[signal] or other way around.
-L, --table List signal names in a nice table.
kill examples

kill -9 -1

Kills all processes possible to be killed.


kill -l 11
Translates signal number 11 into its signal name.
kill -L

Lists the available signal choices in a tabular format.


kill 123 543 2341 3453

Sends the default signal (TERM) to the processes with IDs 123, 543, 2341,
and 3453, terminating those processes.

TAR

The tar program is used to create, maintain, modify, and extract files that
are archived in the tar format.

"tar" stands for tape archive. It is an archiving file format.

tar was originally developed in the early days of Unix for the purpose of backing
up files to tape-based storage devices. It was later formalized as part of
the POSIX standard, and today is used to collect, distribute, and archive files,
while preserving file systemattributes such as user and group permissions,
access and modification dates, and directory structures.

This documentation covers the GNU version of tar, which is included with most
modern variants of the Linux operating system.

tar [-] A --catenate --concatenate | c --create | d diff --compare |

--delete | r --append | t --list | --test-label | u --update |

x --extract --get [options] [pathname ...]

Operation
The first argument to tar should be a function specification: either one of the
letters A, c, d, r, t, u, or x, or one of the long function names. A function letter
does not need to be prefixed with a dash ("-"), and may be combined with other
single-letter options. A long function name must be prefixed with a double dash
("--"). Some options take a parameter; with the single-letter form these must be
given as separate arguments. With the long form, they may be given by
appending "=value" to the option.

SED

sed, short for "stream editor", allows you to filter and transform text.

sed is a stream editor. A stream editor is used to perform basic text


transformations on an input stream (a file, or input from a pipeline). While in
some ways similar to an editor which permits scripted edits (such
as ed), sed works by making only one pass over the input(s), and is
consequently more efficient. But it is sed's ability to filter text in a pipeline which
particularly distinguishes it from other types of editors.

sed OPTIONS... [SCRIPT] [INPUTFILE...]

If you do not specify INPUTFILE, or if INPUTFILE is "-", sed filters the contents of
the standard input. The script is actually the first non-option parameter,
which sed specially considers a script and not an input file if and only if none of
the other options specifies a script to be executed (that is, if neither of the -
e and -f options is specified).

-n, --quiet, --silent Suppress automatic printing of pattern space.

-e script, -- Add the script script to the commands to be executed.


expression=script

-f script-file, --file=script-file Add the contents of script-file to the commands to be executed.

--follow-symlinks Follow symlinks when processing in place.


-i[SUFFIX], --in- Edit files in place (this makes a backup with file extension SUFFIX
place[=SUFFIX] supplied).

-l N, --line-length=N Specify the desired line-wrap length, N, for the "l" command.

--POSIX Disable all GNU extensions.

-r, --regexp-extended Use extended regular expressions in the script.

-s, --separate Consider files as separate rather than as a single continuous long

-u, --unbuffered Load minimal amounts of data from the input files and flush the o
often.

--help Display a help message, and exit.

--version Output version information, and exit.

CRONTAB

crontab - Schedule a command to run at a later time.

SYNOPSIS

crontab [ -u user ] file


crontab [ -u user ] { -l | -r | -e }

DESCRIPTION

Crontab is the program used to install, deinstall or list the tables used to drive
the cron daemon in Vixie Cron. Each user can have their own crontab, and
though these are files in /var, they are not intended to be edited directly. If the
-u option is given, it specifies the name of the user whose crontab is to be
tweaked. If this option is not given, crontab examines "your" crontab, i.e., the
crontab of the person executing the command. Note that su can confuse
crontab and that if you are running inside of su you should always use the -u
option for safety's sake. cron file is used to install a new crontab from some
named file or standard input if the pseudo-filename '-' is given.

Specifying multiple values in a field


The asterisk (*) operator specifies all possible values for a field. e.g. every
hour or every day.

The comma (,) operator specifies a list of values, for example: "1,3,4,7,8".

The dash (-) operator specifies a range of values, for example: "1-6",
which is equivalent to "1,2,3,4,5,6".

The slash (/) operator, can be used to skip a given number of values. For
example, "*/3" in the hour time field is equivalent to
"0,3,6,9,12,15,18,21"; "*" specifies 'every hour' but the "/3" means that
only the first, fourth, seventh...and such values given by "*" are used.

Cron will email to the user all output of the commands it runs, to silence this,
redirect the output to a log file or to /dev/null.

MOUNT

The mount command mounts a storage deviceor filesystem, making it


accessible and attaching it to an existing directory structure.

mount [-lhV]

mount -a [-fFnrsvw] [-t vfstype] [-O optlist]

mount [-fnrsvw] [-o option[,option]...] device|dir

mount [-fnrsvw] [-t vfstype] [-o options] device|dir

All files accessible in Unix, or a Unix-style system such as Linux, are arranged in
one big tree: the file hierarchy, rooted at /. These files can be spread out over
several devices. The mount command attaches a filesystem, located on some
device or other, to the file tree. Conversely, the umount command will detach it
again.

The standard form of the mount command is:


mount -t type device dir

This tells the kernel to attach the filesystem found on device (which is of
type type) at the directory dir. The previous contents (if any), owner,
and mode of dir become invisible, and as long as this filesystem remains
mounted, the pathname dir refers to the root of the filesystem on device.

If only directory or device is given, for example:

mount /dir

Vous aimerez peut-être aussi