Académique Documents
Professionnel Documents
Culture Documents
( (
Aussi bien at que batch lisent les commandes à mémoriser
depuis l'entrée standard, ou dans le fichier indiqué par
l'option -f. Le répertoire de travail, l'environnement
(sauf pour les variables TERM, DISPLAY et _) ainsi que le
umask sont mémorisés au moment de l'invocation. Une com-
NOM mande at - ou batch - invoquée depuis un shell obtenu par
at, batch, atq, atrm - Mémoriser, examiner ou supprimer su(1) mémorisera l'U-ID en cours. L'apppelant recevra par
des jobs à exécuter ultérieurement. courrier (mail) les messages écrits sur les flux de sortie
standard et d'erreur standard, s'il y en a. Le courrier
SYNOPSIS sera envoyé en utilisant la commande /bin/mail. Si at est
at [-V] [-q fichier] [-f fichier] [-mldbv] HEURE invoquée depuis un shell obtenu par su(1), le courier sera
at -c commande [commande...] envoyé à l'utilisateur courrespondant au login.
atq [-V] [-q fichier] [-v]
atrm [-V] commande [commande...] Le Super-Utilisateur peut toujours employer ces commandes.
batch [-V] [-q fichier] [-f fichier] [-mv] [HEURE] Pour les autres utilisateurs, les permissions sont déter-
minées par les fichiers /etc/at.allow et /etc/at.deny.
DESCRIPTION
at et batch lisent, depuis l'entrée standard, ou depuis un Si le fichier /etc/at.allow existe, seuls les utilisateurs
fichier, des commandes qu'ils exécuteront ultérieurement, dont les noms sont mentionnés dans ce fichier peuvent
en utilisant /bin/sh. utiliser at.
at lance les commandes indiquées à une heure précise. Si /etc/at.allow n'existe pas, at vérifie si /etc/at.deny
existe, et tous les utilisateurs non-mentionnés dans ce
atq affiche la liste des commandes en attente fichier ont le droit d'invoquer at.
d'exécution, sauf si l'appelant est le Super-Util-
isateur. Dans ce dernier cas, atq affiche la liste Si aucun de ces deux fichiers n'existe, seul le Super-
des travaux en attente pour tous les utilisateurs. utilisateur a le droit d'appeler at.
atrm efface les travaux en attente. Un fichier /etc/at.deny vide signifie que tous les util-
isateurs ont le droit d'appeler ces commandes, c'est la
batch exécute les commandes indiquées lorsque la charge configuration par défaut.
système le permet, c'est à dire lorsque la charge
du processeur, obtenue depuis le fichier OPTIONS
/proc/loadavg descend en dessous de 1,5 par -V Afficher un numéro de version sur la sortie
défaut, ou en dessous d'une valeur mentionnée d'erreur standard.
explicitement durant l'invocation de atrun.
-q file Utiliser la file d'attente mentionnée. Une file
At permet d'indiquer l'heure de lancement de manière assez est designée par une simple lettre, dans l'inter-
complexe. valle a jusqu'à z, et A jusqu'à Z. La file c est
la file d'attente par défaut pour at tandis que la
Il accepte des spécifications de la forme HHMM ou HH:MM file E est celle par défaut pour batch. Plus les
pour exécuter un travail à une heure donnée de la journée files ont une lettre importante, plus les travaux
en cours (ou du lendemain si l'heure mentionnée est déjà seront exécutés avec une valeur de gentillesse
dépassée). On peut aussi lui fournir l'un des arguments (voir nice(1)) élevée. Si un travail est enreg-
suivants : midnight (minuit), noon (midi), ou teatime istré dans une file avec une lettre majuscule, il
(l'heure du thé, soit 16 heures). Il est également possi- sera transmis à batch à l'heure indiquée. Si l'on
ble de fournir un suffixe du type AM (matin), ou PM invoque atq avec un nom de file spécifique, il ne
(après-midi) avec une heure sur un cadran de 12 heures. montrera que les travaux en attente dans cette
On peut indiquer le jour de lancement, en précisant une file.
date du type nom-du-mois (en anglais) jour et éventuelle-
ment année, ou encore une date du type MMJJAA ou MM/JJ/AA -m Envoyer un courier à l'utilisateur lorsque le tra-
ou JJ.MM.AA. (NDT : C'est sympa de penser aux gens qui vail est terminé, même s'il n'a rien écrit sur ses
notent le jour avant le mois :-) flux de sortie.
On peut indiquer une heure de la forme now(maintenant) + -f fichier
nombre d'unités, où les unités peuvent être minutes, Lire la commande à exécuter dans le fichier et non
hours, days (jours), ou weeks (semaines) et on peut égale- pas sur l'entrée standard.
ment demander à at de déclencher le travail le jour même
en ajoutant le suffixe today ou le lendemain en ajoutant -l Est un alias pour atq.
tomorrow.
-d Est un alias pour atrm.
Par exemple, pour lancer une commande à 16 heures, 3 jours
plus tard, on peut indiquer at 4pm + 3 days, pour lancer -b Est un alias pour batch.
le travail à 10 heures du matin le 31 Juillet, il faut
invoquer at 10am Jul 31 et pour lancer une commande à 1 -v Pour atq, afficher les travaux terminés mais pas
heure du matin le lendemain, effectuez at 1am tomorrow. encore effacés de la file. Pour les autres,
afficher les heures de lancement programmées.
!
et le codage d'Huffman. La compression est généralement
-c Imprimer sur la sortie standard les travaux men- nettement meilleure que celle atteinte par des com-
tionnés sur la ligne de commande. presseurs conventionnels basés sur LZ77/LZ78, et approche
les performances de la famille des compresseurs statis-
FICHIERS tiques PPM.
/var/spool/at
/var/spool/at/spool Les options de ligne de commandes sont délibérément très
/proc/loadavg similaires à celle de GNU gzip, mais elles ne sont pas
/etc/utmp identiques.
/etc/at.allow
/etc/at.deny bzip2 attend une liste de noms de fichiers pour accompag-
ner les options de ligne de commandes. Chaque fichier est
VOIR AUSSI remplacé par une version compressée de lui-même, avec le
cron(1), nice(1), sh(1), umask(2), atrun(8) nom "nom_original.bz2". Un fichier compressé a les mêmes
date de modification, les mêmes permissions, et, quand
BOGUES c'est possible, les mêmes propriétés que celles du fichier
Sous Linux, batch est tributaire d'un système de fichiers original, de sorte que ces caractéristiques peuvent cor-
de type proc monté sur le répertoire /proc. rectement être restaurées au moment de la décompression.
Le traitement du nom du fichier est naïf dans le sens
Si le fichier /etc/utmp n'est pas disponible, ou est qu'il n'y a pas de mécanisme pour préserver les noms, per-
endommagé, ou si l'utilisateur n'est pas connecté lorsque missions, propriétés et les dates des fichiers situés dans
at est invoquée, le courrier est envoyé a l'U-ID corre- des systèmes de fichiers où ces concepts manquent, ou qui
spondant à la variable d'environnement LOGNAME. Si celle- ont des restrictions strictes en ce qui concerne la
ci est indéfinie ou vide, l'U-ID courant est utilisé par longueur des noms de fichiers, comme MS-DOS.
défaut.
bzip2 et bunzip2, par défaut, n'écraseront pas les
At et batch, tels qu'ils sont implementés actuellement, ne fichiers existants. Si vous voulez le contraire, utilisez
sont pas fiables lorsqu'il y a une situation de manque de l'option -f.
ressources systèmes. Si c'est régulièrement le cas sur
votre site, vous devriez vous orienter vers un autre Si aucun nom de fichier n'est indiqué, bzip2 compresse de
système de lancements différes, comme nqs. l'entrée standard vers la sortie standard. Dans ce cas,
bzip2 n'écrira pas la sortie sur un terminal, puisque cela
AUTEURS serait incompréhensible et donc inutile.
At a été écrit principalement par Thomas Koenig,
ig25@rz.uni-karlsruhe.de. Les routines d'analyse des bunzip2 (ou bzip2 -d) décompresse tous les fichiers
dates et heures sont de David Parsons, orc@pell.chi.il.us. précisés. Les fichiers qui n'ont pas été créés par bzip2
sont détectés et ignorés, et un avertissement est émis.
bzip2 tente de deviner le nom du fichier décompressé à
TRADUCTION partir de celui du fichier compressé de la manière suiv-
Christophe Blaess, 1997. ante :
En tant que vérification interne, bzip2 utilise des CRC Durant la compression, -s sélectionne une taille de
32bits pour s'assurer que la version décompressée d'un bloc de 200Ko, ce qui limite l'utilisation de
fichier est identique au fichier original. Ceci permet mémoire d'a peu près le même nombre, aux dépens du
une protection contre la corruption des données com- coefficient de compression. Bref, si votre machine
pressées, et contre des bogues non détectés de bzip2 possède peu de mémoire vive (8 Mo ou moins),
(heureusement très improbables). La probabilité qu'une utilisez -s pour tout ce que vous faites. Voir
corruption de données passe inaperçue est infime, environ GESTION DE LA MEMOIRE plus bas.
une chance sur 4 milliards pour chaque fichier compressé.
Soyez conscients, toutefois, que la vérification se pro- -q --quiet
duit pendant la décompression, et qu'elle ne peut donc Supprime les messages d'avertissement non essen-
vous informer que lorsque quelque chose s'est mal passé. tiels. Les messages se rattachant aux erreurs
Cela ne peut pas vous permettre de récupérer les données d'E/S et à d'autres événements critiques ne sont
non compressées originales. Vous pouvez utiliser pas supprimés.
bzip2recover pour essayer de récupérer des données de
fichiers endommagés. -v --verbose
Mode volubile -- montre le coefficient de compres-
Valeurs de retour : 0 pour une sortie normale, 1 pour des sion pour chaque fichier traité. Des -v supplémen-
problèmes d'environnement (fichier non trouvé, options taires augmentent le niveau de volubilité, en
invalides, erreurs d'entrée/sortie, etc.), 2 pour indiquer affichant des tas d'informations qui sont princi-
un fichier compressé corrompu, 3 pour une erreur de con- palement utiles à des fins de diagnostic.
sistance interne (un bogue, p.ex.) qui a fait paniquer
bzip2. -L --license -V --version
Afficher la version du logiciel, les termes et con-
ditions d'utilisation.
OPTIONS
-c --stdout -1 to -9
Compresser ou décompresser sur la sortie standard. Fixe la taille de bloc à 100, 200, ... 900 k pen-
dant la compression. Cette option n'a aucun effet
-d --decompress sur la décompression. Voir GESTION DE LA MEMOIRE
Forcer la décompression. bzip2, bunzip2 et bzcat ci-dessous.
constituent en fait le même programme, et la
décision quant aux actions à entreprendre est -- Traiter tous les arguments ultérieurs en tant que
déterminée sur la base du nom du fichier utilisé. noms de fichiers, même s'ils débutent par un tiret.
Cette option annule ce mécanisme, et force bzip2 à Ainsi, vous pouvez traiter des fichiers dont les
décompresser. noms commencent par un tiret, par exemple : bzip2
-- -monfichier.
-z --compress
Le complément de -d : force la compression, quel --repetitive-fast --repetitive-best
que soit le nom d'invocation. Ces options sont redondantes dans les versions
0.9.5 et ultérieures. Elles fournissent un
- &
contrôle assez grossier sur le comportement de Voici une table qui résume l'utilisation maximale de la
l'algorithme de tri dans les versions antérieures, mémoire pour différentes tailles de blocs, ainsi que la
ce qui était parfois utile. Les versions 0.9.5 et taille compressée totale de 14 fichiers du Calgary Text
ultérieures disposent d'un algorithme amélioré qui Compression Corpus totalisant 3141622 octets. Cette table
rend l'usage de ces options inutile. donne un certain aperçu sur l'évolution de la compression
avec la taille de bloc. Ces chiffres tendent à minimiser
l'avantage des tailles de blocs plus importantes pour les
GESTION DE LA MEMOIRE fichiers plus imposants, car le Corpus est dominé par des
bzip2 compresse des fichiers importants par blocs. La petits fichiers.
taille de bloc affecte à la fois le coefficient de com-
pression atteint, et le montant de mémoire nécessaire pour Usage Usage Usage Taille
la compression et la décompression. Les options -1 à -9 du
précisent la taille de bloc utilisée, de 100000 octets à Option compr. décompr. décompr. -s Corpus
900000 octets (par défaut) respectivement. Au moment de
la décompression, la taille de bloc utilisée pour la com- -1 1200 k 500 k 350 k 914704
pression est lue à partir de l'entête du fichier com- -2 2000 k 900 k 600 k 877703
pressé, et bunzip2 s'alloue ensuite juste assez de mémoire -3 2800 k 1300 k 850 k 860338
pour décompresser ce fichier. Puisque les tailles de -4 3600 k 1700 k 1100 k 846899
blocs sont conservées dans les fichiers compressés, il -5 4400 k 2100 k 1350 k 845160
s'ensuit que les options -1 à -9 ne sont pas pertinentes, -6 5200 k 2500 k 1600 k 838626
et qu'elles sont donc ignorées durant la décompression. -7 6100 k 2900 k 1850 k 834096
-8 6800 k 3300 k 2100 k 828642
Les exigences mémoire de la compression et de la décom- -9 7600 k 3700 k 2350 k 828642
pression, en octets, peuvent être estimées à :
0 *
PERFORMANCES vers les sources de documentation. Christian von Roques
La phase de tri de la compression réunit les chaînes de m'encouragea à chercher des algorithmes de tri plus rapi-
caractères similaires présentes dans le fichier. A cause des, pour accélérer la compression. Bela Lubkin m'encour-
de cela, les fichiers contenant de très longues suites de agea à améliorer la performance de la compression dans le
symboles répétés, comme "aabaabaabaab ..." (répétés pire des cas. Beaucoup de personnes m'ont envoyé des
plusieurs centaines de fois) peuvent être compressés plus patchs, aidé pour des problèmes de portabilité, prêté des
lentement que d'habitude. Les versions 0.9.5 et machines, donné des conseils et ont été généralement
ultérieures se conduisent nettement mieux que les versions utiles.
précédentes de ce point de vue. Le rapport entre le temps
de compression dans le pire des cas et dans le cas moyen
est de l'ordre de 10 pour 1. Pour les versions TRADUCTION
antérieures, ce rapport était de 100 pour 1. Vous pouvez Frédéric Delanoy, 2000.
utiliser l'option -vvvv pour voir la progression dans les
détails, si vous le souhaitez.
La vitesse de décompression n'est pas affectée par ces Linux 9 Août 2000 BZIP2(1)
phénomènes.
INCONVÉNIENTS DESCRIPTION
Les messages d'erreurs d'E/S ne sont pas d'une grande Cal affiche un calendrier. Si les arguments sont omis, le
utilité. bzip2 essaie vraiment de détecter les erreurs mois courant est affiché. Les options sont les suivantes:
d'E/S et de s'arrêter proprement, mais les détails du
problème rencontré peuvent parfois induire en erreur.
-j Affiche les numéros des jours dans l'année (le
Cette page de manuel se rattache à la version 0.9.5 de numéro 1 correspond au 1er Janvier).
bzip2. Les données compressées créées par cette version
sont entièrement compatibles de façon descendante et -y Affiche le calendrier de l'année courante.
ascendante avec les versions antérieures 0.1pl2 et 0.9.0,
à l'exception près que les versions 0.9.0 et ultérieures Un paramètre unique indique l'année (1 - 9999) à afficher;
peuvent correctement décompresser de multiples fichiers noter que l'année doit être complètement spécifiée : ``cal
compressés et concaténés. La version 0.1pl2 ne sait pas 89'' n'affiche pas le calendrier de 1989. Deux paramètres
le faire; elle s'arrêtera après la décompression du pre- indiquent le mois (1 - 12) et l'année. S'il n'y a pas de
mier fichier du flux. paramètres, le calendrier du mois courant est affiché.
bzip2recover utilise des entiers 32 bits pour représenter L'année commence le 1er Janvier.
les positions des bits dans les fichiers compressés ; de
ce fait, il ne peut traiter de fichiers compressés de plus On considère généralement que le passage au calendrier
de 512 Mo de long. Ceci pourrait être résolu facilement. grégorien est survenu le 3 Septembre 1752. A cette
époque, la plupart des pays avaient reconnu ce calendrier
(mais quelques uns ne le reconnurent qu'au début du 20ème
AUTEUR siècle). Les dix jours suivant cette date furent
Julian Seward, jseward@acm.org. éliminés, et donc le calendrier de ce mois est un peu par-
ticulier.
http://www.muraroa.demon.co.uk
HISTORIQUE
Les idées intégrées à bzip2 sont dues (entre autres) aux La commande cal est apparue dans la version 6 de AT&T
personnes suivantes : Michael Burrows et David Wheeler UNIX.
(pour la transformation de tri de blocs), David Wheeler (à
nouveau, pour le codeur Huffman), Peter Fenwick (pour le
modèle de codage structuré du bzip, original et pour de TRADUCTION
nombreux raffinements), et Alistair Moffat, Radford Neal Michel Quercia, 1997.
et Ian Witten (pour le codeur arithmétique du bzip origi-
nal). Je suis très reconnaissant à ces personnes pour
leur aide, leur support et lerus conseils. Voyez le
manuel dans la distribution source pour obtenir des liens BSD Expérimental 20 Mai 1997 CAL(1)
TRADUCTION
Christophe Blaess, 1997.
-e Equivalent à -vE.
-n, --number
Numéroter les lignes en sortie, en commençant à 1.
NOM
-s, --squeeze-blank chgrp - Changer le groupe propriétaire d'un fichier.
Remplacer les lignes blanches consécutives par une
seule ligne blanche. SYNOPSIS
chgrp [options] groupe fichier...
-t Equivalent à -vT.
Options POSIX : [-R] [--]
-u Sans effet - pour compatibilité Unix seulement.
Options du draft d'Austin : [-hHLPR]
-v, --show-nonprinting
Afficher les caractères de contrôles, sauf les Description GNU de groupe : [--reference=rfile]
sauts de ligne et les tabulations en utilisant la
notation `^', et préfixer avec `M-' les caractères Options GNU (forme courte) : [-cfvR] [--help] [--version]
ayant leur huitième bit positionné. [--]
!
groupe du lien lui-même et pas celui de l'objet
vers lequel il pointe. Si le système ne supporte ENVIRONNEMENT
pas les groupes pour les liens symboliques, ne rien LANG, LC_ALL, LC_CTYPE et LC_MESSAGES ont leurs significa-
faire. tions habituelles. Sur un système conforme XSI, NLSPATH a
la signification normale.
-H (half-logical)
(Quand elle est fournie conjointement avec -R.) Si CONFORMITÉ
un fichier est un lien symbolique vers un réper- POSIX 1003.2 ne documente que l'option -R. Toutes les
toire, changer le groupe du répertoire et des autres options peuvent ne pas être portables.
fichiers de la hiérarchie en dessous.
NOTES
-L (logique) Cette page décrit la version de chgrp trouvée dans le
(Quand elle est fournie conjointement avec -R.) Si paquetage fileutils-4.0, d'autres versions peuvent
un fichier rencontré sur la ligne de commande ou différer légèrement.
durant la traversée de l'arborescence est un lien
symbolique vers un répertoire, changer le groupe du TRADUCTION
répertoire et des fichiers de la hiérarchie en Christophe Blaess, 1997.
dessous.
-P (physique)
(Quand elle est fournie conjointement avec -R.) Si FSF 30 Août 2000 CHGRP(1)
un fichier erencontré sur la ligne de commande ou
durant la traversée de l'arborescence est un lien
symbolique, changer le groupe du lien lui-même et
pas celui de l'objet vers lequel il pointe. Si le ! " ! "
système ne supporte pas les groupes pour les liens
symboliques, ne rien faire. C'est le comportement
par défaut.
'
to have chkconfig query an alternative runlevel rather # description: Saves and restores system entropy pool for \
than the current one. # higher quality random number generation.
This says that the random script should be started in lev-
If one of on, off, or reset is specified after the service els 2, 3, 4, and 5, that its start priority should be 20,
name, chkconfig changes the startup information for the and that its stop priority should be 80. You should be
specified service. The on and off flags cause the service able to figure out what the description says; the \ causes
to be started or stopped, respectively, in the runlevels the line to be continued. The extra space in front of the
being changed. The reset flag resets the startup informa- line is ignored.
tion for the service to whatever is specified in the init
script in question.
SEE ALSO
By default, the on and off options affect only runlevels init(8) ntsysv(8) serviceconf(8)
3, 4, and 5, while reset affects all of the runlevels.
The --level option may be used to specify which runlevels
are affected. AUTHOR
Erik Troan <ewt@redhat.com>
Note that for every service, each runlevel has either a
start script or a stop script. When switching runlevels,
init will not re-start an already-started service, and
will not re-stop a service that is not running. Wed Oct 8 1997 CHKCONFIG(8)
OPTIONS
--level levels # #
Specifies the run levels an operation should per-
tain to. It is given as a string of numbers from 0
to 7. For example, --level 35 specifies runlevels 3
and 5.
NOM
chmod - Modifier les autorisations d'accès à un fichier.
--add name
SYNOPSIS
This option adds a new service for management by chmod [options] mode fichier...
chkconfig. When a new service is added, chkconfig
ensures that the service has either a start or a Options POSIX : [-R]
kill entry in every runlevel. If any runlevel is
missing such an entry, chkconfig creates the appro- Options GNU (forme courte): [-cfvR] [--help] [--version]
priate entry as specified by the default values in [--]
the init script.
DESCRIPTION
chmod modifie les permissions d'accès de chacun des
--del name fichiers indiqués, en suivant l'indication de mode, qui
The service is removed from chkconfig management, peut être une représentation symbolique du changement à
and any symbolic links in /etc/rc[0-6].d which per- effectuer, ou un nombre octal représentant le motif
tain to it are removed. binaire des nouvelles autorisations.
- &
concernée : Ne pas afficher de messages d'erreurs concernant
les fichiers dont les autorisations n'ont pas pu
r lecture, être modifiées.
u les permissions dont dispose actuellement le pro- POSIX ne décrit pas l'utilisation du bit `t' (sticky). Le
priétaire du fichier, standard ne précise pas non plus si chmod doit préserver
la cohérence en effaçant ou en refusant de positionner les
g les permissions dont disposent actuellement les bits Set-UID ou Set-GID si tous les bits d'exécution sont
autres membres du groupe propriétaire du fichier, effacés.
o les permissions dont disposent tous les autres Nous avons décrit plus haut le comportement du bit `t' sur
utilisateurs. les répertoires. Chaque système attache une signification
personnel à ce bit. En particulier Linux adopte le com-
Une valeur numérique pour le mode est constituée de 1 à 4 portement de System V (void SVID version 3), en utilisant
chiffres en octal (0 a 7), calculés en additionnant les le bit Set-GID des fichiers sans autorisation d'exécution
bits de valeurs 4, 2, et 1. Un bit non mentionné étant pour le groupe comme un verrou. Pour plus de détails voyez
considéré comme nul. Le premier chiffre correspond aux le fichier /usr/src/linux/Documentation/mandatory.txt.
attributs Set-UID (4), Set-GID (2), et conservation du
code en mémoire [`stickyi bit'] (1). Le second chiffre TRADUCTION
correspond aux autorisations de lecture (4), écriture (2) Christophe Blaess, 1997.
et exécution pour l'utilisateur propriétaire du fichier.
Le troisième et le quatrième chiffres correspondent
respectivement aux autorisations d'accès pour les membres
du groupe du fichier, et pour les autres utilisateurs. FSF 29 Novembre 1996 CHMOD(1)
0 *
([NDT] chown = Change Owner).
ENVIRONNEMENT
chown modifie l'utilisateur et/ou le groupe propriétaire LANG, LC_ALL, LC_CTYPE et LC_MESSAGES ont leurs significa-
de chacun des fichiers indiqués, en fonction du premier tions habituelles.
argument rencontré sur la ligne de commande, et qui ne
soit pas une option.
CONFORMITÉ
Si l'on indique uniquement un nom d'utilisateur (ou un UID POSIX 1003.2 n'autorise pas l'utilisation du point comme
numérique), celui-ci devient le propriétaire des fichiers séparateur de nom d'utilisateur et de groupe.
donnés, mais les groupes de ces fichiers ne sont pas mod-
ifiés.
TRADUCTION
Si le nom d'utilisateur est suivi d'un double-point, et Christophe Blaess, 1997.
d'un nom de groupe (ou d'un GID numérique), les fichiers
changent également de groupe.
-v, --verbose
Décrire les changements de propriétés.
NOM
cp - Copier des fichiers.
-R, --recursive
Modifier récursivement l'appartenance des réper-
SYNOPSIS
toires et de leurs contenus.
cp [options] fichier chemin
cp [options] fichier... répertoire
--help Afficher un message d'aide sur la sortie standard,
et terminer normalement.
Options POSIX : [-fipRr]
--version
Options GNU (forme courte) : [-abdfilprsuvxPR] [-S SUF-
Afficher le numéro de version sur la sortie stan-
FIXE] [-V {numbered,existing,simple}] [--sparse=WHEN]
dard, et terminer normalement.
[--help] [--version] [--]
rectement les copies des fichiers spéciaux ou des
DESCRIPTION FIFOs.
cp sert à copier des fichiers (et eventuellement des
répertoires). On peut aussi bien copier un fichier donné -r Copier récursivement les répertoires mais la ges-
vers une destination précise que copier un ensemble de tion des fichiers spéciaux n'est pas définie. En
fichiers dans un répertoire. fait l'option -r est autorisée, et même encouragée
à se comporter comme l'option -R, toutefois le com-
Si le dernier argument correspond à un nom de répertoire, portement (stupide) de la version GNU n'est pas
cp copie dans ce répertoire chaque fichier indiqué en con- interdit.
servant le même nom.
Spécificité GNU
Sinon, s'il n'y a que deux fichiers indiqués, il copie le En général les fichiers sont écrits immédiatement après
premier sur le second. lecture de l'original, sauf si l'on utilise l'option
--sparse décrite plus bas.
Une erreur se produit si le dernier argument n'est pas un
répertoire, et si plus de deux fichiers sont indiqués. Par Par défaut, cp ne copie pas les répertoires (voir l'option
défaut, on n'effectue pas la copie de répertoires. -r).
Ainsi `cp -r /a /b' copiera /a dans /b/a et /a/x dans cp refuse généralement de copier un fichier sur lui-même,
/b/a/x au cas où /b existe déjà, mais il copiera /a sur /b avec l'exception suivante : si les options --force et
et /a/x dans /b/x si /b n'existait pas encore. --backup sont indiquées, et si les fichiers origine et
copie sont identiques et se rapportent à un fichier
Les autorisations d'accès des fichiers et des répertoires régulier, cp effectuera une copie de sauvegarde (voir plus
créés seront les mêmes que celles des fichiers d'origine bas). Ceci peut servir à faire une sauvegarde d'un
masquées avec un ET binaire avec 0777, et modifiées par le fichier avant de le modifier.
umask de l'utilisateur (sauf si l'on invoque l'option -p).
CONFORMITÉ
POSIX 1003.2.
" & "
TRADUCTION
Christophe Blaess, 1997.
NOM
cron - Démon permettant de lancer des commandes différées
FSF 5 Mai 1999 CP(1) (Vixie Cron).
SYNOPSIS
cron
" & " DESCRIPTION
Cron devrait normallement être lancé par un script /etc/rc
ou /etc/rc.local. Cette commande revient immédiatement, il
n'est pas nécessaire de la lancer avec un '&'.
NOM
cron - Démon permettant de lancer des commandes différées Cron recherche dans le répertoire /var/spool/cron, des
(Vixie Cron). fichiers de crontab ayant des noms existants dans
/etc/passwd. Les fichiers trouvés sont chargés en mémoire.
SYNOPSIS Cron recherche également /etc/crontab, qui a un format
cron différent (voir crontab(5)).
AUTEUR
Paul Vixie <paul@vix.com>
TRADUCTION
Christophe Blaess, 1998.
NOM
crontab - Editer son fichier crontab personnel.
- &
SYNOPSIS TRADUCTION
crontab [ -u utilisateur ] fichier Christophe Blaess, 1997.
crontab [ -u utilisateur ] { -l | -r | -e }
DESCRIPTION
Crontab est le programme utilisé pour installer, désin- Linux 22 Avril 1997 CRONTAB(1)
staller, ou afficher le contenu des tables permettant de
piloter le fonctionnement du démon cron(8) de Vixie Cron.
Chaque utilisateur dispose de sa propre table crontab, et
bien que celles-ci se trouvent dans /var, elles ne sont ' '
pas conçues pour être éditées directement.
L'option -l permet d'imprimer la table crontab en cours La partie affichée est sélectionnée par les options
sur la sortie standard. présentées ci-dessous.
0 *
défaut, par une Tabulation.
t tabulation horizontale
-d, --delimiter séparateur
Avec -f, les champs sont délimités par le premier Champs horaires :
caractère du séparateur à la place de la Tabula-
tion. %H heure (00..23)
Si l'on fournit un argument ne commençant pas par `+', Il est parfois indésirable que les 9 premiers jours du
date le considère comme une heure à utiliser pour config- mois soient complétés par un zéro. l'argument `%d' est
urer l'horloge système. Cet argument doit être constitué responsable de ce complément sur deux chiffres. Par exem-
uniquement de chiffres, ayant la signification suivante : ple `date -d 1-may '+%d %B'' donnera `01 May'.
mm minute TRADUCTION
Christophe Blaess, 1997.
SS Deux premiers chiffres de l'année (facultatif)
OPTIONS
-d chaîne_date, --date chaîne_date
Afficher la date et l'heure indiquées par la chaîne NOM
chaîne_date. L'affichage est fait avec le format dd - Convertir un fichier en le copiant.
par défaut, à moins qu'un argument commençant par
un `+' ne fournisse un autre format SYNOPSIS
dd [--help] [--version] [if=fichier] [of=fichier]
--help Afficher un message d'aide sur la sortie standard, [ibs=octets] [obs=octets] [bs=octets] [cbs=octets]
et terminer normalement. [skip=blocs] [seek=blocs] [count=blocs]
[conv={ascii,ebcdic,ibm,block,unblock,lcase,ucase,swab,noer-
-s chaîne_date, --set chaîne_date ror,notrunc, sync}]
Configurer l'horloge système avec la date et
l'heure indiquées par chaîne_date, qui peut con- DESCRIPTION
tenir éventuellement des noms littéraux de mois, de dd copie un fichier (par défaut, depuis l'entrée standard
fuseau horaire, `am' ou `pm', etc... vers la sortie standard) en permettant de sélectionner la
taille de bloc, et d'effectuer des conversions.
-u, --universal
Afficher ou configurer l'heure en utilisant le OPTIONS
Temps Universel (heure du méridien de Greenwich) Tous les nombres peuvent être suivis d'un multiplicateur
plutôt que le temps local. correspondant à :
b=512, c=1, k=1024, w=2, xm=nombre m
--version
Afficher un numéro de version sur la sortie stan- if=fichier
dard, et terminer normalement. Lire les données depuis le fichier indiqué plutôt
que depuis l'entrée standard.
EXEMPLES
Pour afficher la date de l'avant-veille : of=fichier
Ecrire les données dans le fichier mentionné, et
date --date '2 days ago' non pas sur la sortie standard. Si conv=notrunc
n'est pas indiqué, le fichier est limité à la
Pour afficher la date du jour à venir dans 3 mois plus un taille spécifiée par seek= (0 octets si seek= n'est
jour : pas fourni).
!
ibs=nombre et terminer correctement.
Lire le nombre indiqué d'octets en une fois.
--version
obs=nombre Afficher un numéro de version sur la sortie stan-
Ecrire le nombre indiqué d'octets en une fois. dard, et terminer correctement.
conv=conversion[,conversion]... #! #!
Modifier le fichier comme indiqué par l'argument
conversion, qui peut prendre les valeurs suivantes:
'
disque contenant un système de fichiers monté, df -t type, --type=type
affichera l'espace disponible sur ce système de fichiers Limiter la liste aux systèmes de fichiers du type
plutôt que sur celui contenant le noeud du périphérique. indiqué. On peut fournir plusieurs types de
systèmes en utilisant plusieurs options -t. Par
OPTIONS POSIX défaut, rien n'est omis.
-k Utiliser des unités de 1024 octets plutôt que les
unités de 512 octets par défaut. -T, --print-type
Afficher le type de chaque système de fichiers.
-P Affichage sur six colonnes, précédées de l'en-tête Les types affichés sont indiqués par le système (de
`Filesystem N-blocks Used Available Capacity manière spécifique, par exemple en lisant
Mounted on' (avec N=512, ou N=1024 si l'option -k /etc/mtab). Voir également mount(8).
est utilisée).
-x type, --exclude-type=type
OPTIONS GNU Limiter l'affichage aux systèmes n'ayant PAS le
-a, --all type indiqué. Plusieurs types de systèmes de
Inclure dans le listing les systèmes de fichiers fichiers peuvent être éliminés en utilisant
ayant une taille de 0 blocs, et qui sont omis par plusieurs options -x. Par défaut, rien n'est omis.
défaut. Il s'agit typiquement de pseudo-systèmes de
fichiers particuliers comme les entrées d'un auto- -v Ignoré. Pour compatibilité avec System V. df.
monteur. De même les systèmes de type "ignore" ou
"auto" utilisés par certains systèmes d'exploita- OPTIONS STANDARDS GNU
tion ne sont inclus qu'avec cette option. --help Afficher un message d'aide sur la sortie standard,
et terminer correctement.
-h, --human-readable
Ajouter à chaque valeur une lettre comme M pour --version
Méga-octet, afin d'améliorer la lisiblité. Afficher un numéro de version sur la sortie stan-
dard, et terminer correctement.
-i, --inodes
Afficher les informations sur l'utilisation des i- -- Fin de la liste d'options.
noeuds plutôt que les blocs. Un i-noeud (noeud
d'index) contient des informations sur un fichier ENVIRONNEMENT
comme son propriétaire, ses dates d'accés et sa La variable POSIXLY_CORRECT determine le choix des unités.
position sur le disque. Si elle n'existe pas, et si la variable BLOCKSIZE a une
valeur commencant par HUMAN alors, le comportement est
-k, --kilobytes celui de l'option -h (à moins qu'il soit surchargé par une
Afficher les valeurs avec des unités de 1024 option -k ou -m). Les variables LANG, LC_ALL, LC_CTYPE et
octets. LC_MESSAGES ont leurs significations habituelles.
- &
NOM
dmesg - Afficher et contrôler le tampon des messages du NOM
noyau. du - Statistiques sur l'utilisation du disque.
SYNOPSIS SYNOPSIS
dmesg [ -c ] [ -n nivaeu ] [ -s taille ] du [options] [fichier...]
NOM
% ) % ) fdisk - Manipuler les tables de partitions pour Linux.
SYNOPSIS
fdisk [-u] périphérique
NOM
env - Exécuter un programme dans un environnement modifié. fdisk -l [-u] [périphérique ...]
! !
fdisk -s partition ... sur l'entête de volume. Ne modifiez pas son type ni ne
créez de système de fichiers dessus, car vous perdriez
fdisk -v alors la table des partitions. N'utilisez ce type de
label que quand vous travaillez sous Linux sur des
DESCRIPTION machines IRIX/SGI ou quand vous utilisez des disques
Les disques durs peuvent être divisés en un ou plusieurs IRIX/SGI sous Linux.
disques logiques appelés partitions. Cette division est
décrite dans la table des partitions trouvée sur le Une table de partitions de type DOS peut décrire un nombre
secteur 0 du disque. illimité de partitions. Dans le secteur 0, il y a de la
place pour décrire 4 partitions (appelées `primaires').
Dans le monde BSD, on parle de `tranches de disque' et de L'une d'entre elles peut être une partition étendue; c'est
`label de disque'. une sorte de boîte contenant des partitions logiques, dont
les descripteurs sont trouvés dans une liste chaînée de
Linux a besoin d'au moins une partition, pour son système secteurs, chacun précédant les partitions logiques corre-
de fichiers racine. Il peut utiliser des fichiers de swap spondantes. Les quatre partitions primaires, présentes ou
ou des partitions de swap, mais ces dernières sont plus pas, portent les numéros 1-4. Les partitions logiques
efficaces. C'est pourquoi, en général, on utilise une sont numérotées à partir de 5.
seconde partition Linux en tant que partition de swap.
Sur les matériels compatibles Intel, le BIOS qui démarre Dans une table de partitions de type DOS, le décalage de
le système ne peut souvent accéder qu'aux 1024 premiers départ et la taille de chaque partition sont conservés de
cylindres du disque. Pour cette raison, les personnes deux façons : comme un nombre absolu de secteurs (en 32
possédant des disques volumineux créent souvent une bits), ou comme un triplet Cylindres/Têtes/Secteurs (en
troisième partition, de quelques MB de taille, montée en 10+8+6 bits). La première manière fonctionne bien - avec
général en /boot, pour conserver l'image du noyau et un des secteurs de 512 bytes, cela marchera jusqu'à 2 TB. La
petit nombre de fichiers auxiliaires nécessaires au démar- seconde possibilité souffre de deux problèmes différents.
rage, pour être sûr que ce matériel soit accessible par le Primo, ces champs C/T/S ne peuvent être remplis que
BIOS. Il peut y avoir des raisons de sécurité, de lorsque les nombre de têtes et de secteurs par piste sont
facilité d'administration et de sauvegarde ou de tests connus. Secundo, même si l'on connaissait ces nombres,
pour utiliser plus que le nombre minimal de partitions. les 24 bits qui sont disponibles ne suffiraient pas. DOS
utilise uniquement C/T/S, Windows utilise les deux, Linux
fdisk (dans la première forme d'invocation) est un pro- ne l'utilise jamais.
gramme dirigé par un menu utilisé pour la création et la
manipulation de tables de partitions. Il comprend les Si c'est possible, fdisk déterminera la géométrie du
tables de partitions de type DOS, et les labels de disque disque automatiquement. Ce n'est pas nécessairement la
BSD ou SUN. géométrie physique du disque (en effet, les disques mod-
ernes n'ont pas réellement de géométrie physique, et
Le périphérique est en général l'un des suivants : sûrement pas une géométrie décrite dans la forme simpliste
/dev/hda Cylindres/Têtes/Secteurs), mais c'est la géométrie de
/dev/hdb disque utilisée par MS-DOS pour la table des partitions
/dev/sda que fdisk peut détecter.
/dev/sdb
(/dev/hd[a-h] pour les disques IDE, /dev/sd[a-p] pour les D'habitude, tout se passe bien, et il n'y a aucun problème
disques SCSI, /dev/ed[a-d] pour les disques ESDI, si Linux est le seul système sur le disque. Néanmoins, si
/dev/xd[ab] pour les disques XT). Un nom de périphérique le disque doit être partagé avec d'autres systèmes
référence le dique entier. d'exploitation, c'est en général une bonne idée de laisser
créer au moins une partition par un fdisk d'un autre
La partition est un nom de périphérique suivi d'un numéro système d'exploitation. Quand Linux démarre, il regarde
de partition. Par exemple, /dev/hda1 est la première par- la table des partitions, et essaie de déduire quelle
tition sur le premier disque dur IDE du système. Les dis- (fausse) géométrie est requise pour une bonne coopération
ques IDE peuvent avoir jusqu'à 63 partitions, les disques avec les autres systèmes.
SCSI jusqu'à 15. Pour de plus amples informations, lisez
/usr/src/linux/Documentation/devices.txt. Chaque fois qu'une table des partitions est écrite, un
test de cohérence est effectué sur les entrées de la table
Un label de disque de type BSD/SUN peut décrire 8 des partitions. Ce test vérifie que les début et fin
partitions, dont la troisième devrait être un `disque physiques et logiques sont identiques, et que la partition
entier'. Ne créez pas de partition qui ait son premier commence et se termine avec une limite de cylindre (sauf
secteur sur le cylindre 0 (comme une partition de swap), pour la première partition).
car cela détruirait le label du disque.
Certaines versions de MS-DOS créent une première partition
Un label de disque de type IRIX/SGI peut décrire 15 parti- qui ne commencent pas sur une limite de cylindre, mais sur
tions, dont la onzième devrait être une partition entière le secteur 2 du premier cylindre. Les partitions com-
de `volume', alors que la neuvième devrait être un `entête mençant au cylindre 1 ne peuvent débuter sur une limite de
de volume'. L'entête de volume couvre également la table cylindre, mais cela ne pourrait causer des problèmes que
des partitions, çàd qu'elle débute au bloc zéro et s'étend si vous avez OS/2 sur votre machine.
par défaut sur 5 cylindres. L'espace restant dans
l'entête de volume peut être utilisé par des entrées de Un sync() et un ioctl() BLKRRPART (relire la table des
répertoires d'entête. Aucune partition ne peut empiéter partitions à partir du disque) sont exécutés avant la sor-
! !!
tie quand la table des partitions a été mise à jour. Il y beau programme qui a des exigences strictes sur les tables
a longtemps, il était nécessaire de redémarrer la machine de partitions qu'il accepte, et qui produit des tables de
après l'utilisation de fdisk. Je ne crois pas que cela partitions de haute qualité. A utiliser si vous le pou-
soit encore le cas - en effet, redémarrer trop rapidement vez. fdisk est un programme boggé qui fait des choses
peut causer la perte de données non encore écrites sur assez floues - d'habitude, il arrive à produire des résul-
disque. Notez qu'à la fois le noyau et le matériel disque tats raisonnables. Son seul avantage est qu'il permet le
peut mettre des données dans des tampons. support des labels de disque BSD, et d'autres tables de
partitions non DOS. A éviter si vous le pouvez. sfdisk
est destiné uniquement aux hackers - l'interface utilisa-
AVERTISSEMENT DOS 6.x teur est quelque peu rebutante, mais il travaille mieux
La commande DOS 6.x FORMAT recherche certaines informa- que fdisk et est plus puissant que fdisk et cfdisk. De
tions sur le premier secteur de la zône de données de la plus, il peut être utilisé de façon non interactive.)
partition, et suppose que cette information est plus
fiable que l'information contenue dans la table des parti- Le label de disque de type IRIX/SGI n'est pas supporté
tions. Le FORMAT de DOS suppose que FDISK (de DOS) efface actuellement par le noyau. De plus, les répertoires
les 512 premiers bytes de la zône de données de la parti- d'entête, IRIX/SGI ne sont pas encore entièrement sup-
tion chaque fois qu'un changement de taille se produit. portés.
FORMAT regardera cette information additionnelle même si
l'option /U est donnée -- nous considérons que c'est un Il manque l'option `écrire la table des partitions dans un
bogue dans FORMAT et FDISK de DOS. fichier'.
Les tests de nombres magiques sont utilisés pour vérifier -L suivre les liens symboliques, comme l'option du
des fichiers contenant des données dans des formats fixes même nom utilisée par ls(1). (sur les systèmes
particuliers. L'exemple type est un fichier binaire supportant les liens symboliques).
exécutable (programme compilé) a.out, dont le format est
défini dans a.out.h, et peut-être aussi dans exec.h dans -s Normalement, file n'essaie de lire et déterminer
le répertoire d'inclusion standard. Ces fichiers contien- que le type des fichiers présents comme arguments,
nent un ``nombre magique'' qui indique au système et que stat(2) rapporte en tant que fichiers ordi-
d'exploitation UNIX que le fichier est un binaire naires. Ceci peut éviter des problèmes, car la
exécutable, et qui donne le type précis parmi ces multi- lecture de fichiers spéciaux peut avoir des
ples types possibles. Le concept de ``nombre magique'' a conséquences bizarres. Fournir l'option -s indique
été appliqué par extension aux fichiers de données. Tout à file de lire également les fichiers arguments
fichier contenant un identificateur invariable a une place les fichiers arguments qui sont des fichiers
fixe dans le fichier peut d'habitude être décrit de cette blocs, ou des fichiers spéciaux de périphériques.
façon. L'information sur ces fichiers est lue à partir du C'est utile pour déterminer le type de systèmes de
fichier magique /usr/share/magic. fichiers des données situées dans des partitions
de disque brutes, ç.à.d. des fichiers spéciaux
Si un argument semble être un fichier ASCII, file essaie bloc. Cette option indique également à file de ne
de deviner le langage dans lequel il a été ecrit. Les pas accorder d'importance à la taille de fichier
tests de langage recherchent des chaînes de caractères indiquée par stat(2) puisque, sur certains
particulières (cf names.h) qui peuvent apparaître systèmes, il indique des tailles nulle pour des
n'importe où dans les premiers blocs d'un fichier. Par partitions de disque brutes.
exemple, le mot-clé .br indique que le fichier est proba-
blement un fichier d'entrée troff(1), comme le mot-clé FICHIERS
struct indique un programme C. Ces tests sont moins /usr/share/magic - liste des nombres magiques (par défaut)
fiables que les deux autres types de tests, et donc ils
sont pratiqués en dernier lieu. Les routines de tests de ENVIRONNEMENT
langage testent également quelques types divers (comme les La variable d'environnement MAGIC peut être utilisée pour
archives tar(1)), et déterminent si un fichier de type donner les noms des fichiers de nombres magiques utilisés
inconnu doit être étiqueté `ascii text' (texte ascii) ou par défaut.
`data' (données).
VOIR AUSSI
OPTIONS magic(4) - description du format du fichier magique.
-b Ne pas faire précéder les lignes de sortie par les strings(1), od(1), hexdump(1) - outils d'examen de
noms des fichiers (mode court). fichiers non-textes.
L'ordre des entrées présentes dans le fichier magique est ajouter les mots-clés ``beshort'', ``leshort'',
important. Selon le système que vous utilisez, l'ordre etc. pour regarder les nombres dans le fichier dans
dans lequel elles sont placées peut être incorrect. Si un ordre d'octets spécifique, plutôt que dans
votre ancienne commande file utilise un fichier magique, l'ordre natif des octets du programme exécutant
gardez l'ancien fichier magique pour pouvoir effectuer des file.
comparaisons (renommez-le en /usr/share/magic.orig).
Changements par Ian Darwin et par des auteurs variés,
EXEMPLES incluant Christos Zoulas (christos@astron.com), 1990-1999.
$ file file.c file /dev/hda
file.c: C program text NOTICE LEGALE
file: ELF 32-bit LSB executable, Intel 80386, version 1, Copyright (c) Ian F. Darwin, Toronto, Canada, 1986, 1987,
dynamically linked, not stripped 1988, 1989, 1990, 1991, 1992, 1993.
/dev/hda: block special
Ce logiciel n'est pas sujet et ne peut pas être rendu
$ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10} sujet à n'importe quelle licence de la Compagnie
/dev/hda: x86 boot sector Américaine des Téléphones et Télégraphes (American Tele-
/dev/hda1: Linux/i386 ext2 filesystem phone and Telegraph Company), Sun Microsystems Inc., Digi-
/dev/hda2: x86 boot sector tal Equipment Inc., Lotus Development Inc., les régents de
/dev/hda3: x86 boot sector, extended partition table l'Université de Californie, le Consortium X ou le MIT, ou
/dev/hda4: Linux/i386 ext2 filesystem encore la Free Software Foundation.
/dev/hda5: Linux/i386 swap file
/dev/hda6: Linux/i386 swap file Ce logiciel n'est pas sujet à une restriction d'exporta-
/dev/hda7: Linux/i386 swap file tion du Département du Commerce des Etats-Unis, et peut
/dev/hda8: Linux/i386 swap file être exporté dans n'importe quel pays ou planète.
/dev/hda9: empty
/dev/hda10: empty L'autorisation est donnée à quiconque d'utiliser ce logi-
ciel dans n'importe quel but, et de le modifier et de le
HISTORIQUE distribuer librement, en respectant les restrictions suiv-
Il y a eu une commande file dans chaque UNIX depuis au antes :
moins la version de recherche 6 (page de manuel datée de
janvier 1975). La version de System V a introduit un 1. L'auteur n'est pas responsable des conséquences de
changement majeur : la liste externe des types de nombres l'utilisation de ce logiciel, quelles qu'elles soient,
magiques. Ceci a considérablement ralenti le programme même si elles se produisent à cause de défauts qui y sont
mais l'a rendu beaucoup plus flexible. présents.
Ce programme, basé sur la version System V, a été écrit 2. L'origine de ce logiciel ne doit pas être mal
par Ian Darwin sans jeter un coup d'oeil au code d'une représentée, que ce soit par revendication explicite ou
autre personne. par omission. Puisque peu d'utilisateurs lisent le code
source, les crédits doivent apparaître dans la documenta-
John Gilmore révisa largement le code, l'améliorant par tion.
rapport à la première version. Geoff Collyer trouva
plusieurs inadéquations, et fournit quelques entrées du 3. Les versions modifiées doivent être renseignées comme
fichier magique. Le programme a connu une évolution con- telles, et ne peuvent pas être présentées comme étant le
tinue depuis lors. logiciel original. Puisque peu d'utilisateurs lisent le
code source, les CREDITS doivent apparaître dans la docu-
AUTEUR mentation.
Ecrit par Ian F. Darwin, adresse UUCP {utzoo | ihnp4}!dar-
win!ian, adresse Internet ian@sq.com, adresse postale P.O. 4. Cette notice ne peut être modifiée ou altérée.
Box 603, Station F, Toronto, Ontario, CANADA M4Y 2L8.
Quelques fichiers de support (getopt, strtok) distribués
!0 *
avec ce paquetage sont sujets eux mêmes termes que ceux Ce programme est plus lent que les commandes file de cer-
présents ci-dessus. tains vendeurs de Unix.
Quelques simples fichiers de support (strtol, strchr) dis- Cette page de manuel, en particulier cette section, est
tibués avec ce paquetage sont dans le domaine public, et trop longue.
sont marqués comme tels.
DISPONIBILITÉ
Les fichiers tar.h et is_tar.c ont été écrits par John Vous pouvez obtenir la dernière version de l'auteur origi-
Gilmore pour son programme tar du domaine public, et ne nal par FTP anonyme sur ftp.astron.com dans le répertoire
sont pas couverts par les restrictions ci-dessus. /pub/file/file-X.YY.tar.gz
BOGUES TRADUCTION
Il y a sûrement une meilleure façon d'automatiser la con- Frédéric Delanoy, 2000.
struction du fichier Magique à partir du répertoire mag-
ique. Quelle est-elle ? Il vaudrais mieux compiler le
fichier magique en binaire (via, p.ex., ndbm(3) ou, mieux
encore, en chaînes de caractères ASCII de longueur fixe Linux 5 Septembre 2000 FILE(1)
pour une utilisation dans des environnements réseaux
hétérogènes) pour un démarrage plus rapide. Ensuite, le
programme tournerait aussi vite que la version 7 du pro-
gramme du même nom, avec la flexibilité de la version de ! # ! #
System V.
Il serait souhaitable de permettre les lettres majuscules L'évaluation de l'expression se fait de gauche à droite,
dans les mots-clés pour différencier, par exemple, les en suivant des règles de précédence décrite dans la sec-
commandes troff(1) des macros des pages de manuel. L'util- tion OPÉRATEURS, jusqu'à ce que le résultat soit connu
isation d'expressions régulières devrait rendre cela (par exemple la partie gauche vraie pour un opérateur OU
facile. ou fausse pour un opérateur ET).
Le programme ne reconnaît pas FORTRAN. Il devrait être Le premier argument commençant par `-', `(', `)', `,', ou
capable de le faire en recherchant quelques mots-clés qui `!' est considéré comme le début de l'expression, tous
apparaîssent indentés par rapport au début de la ligne. Le les arguments précédents sont des chemins à parcourir.
support des expressions régulières devrait rendre cela
facile. Tous les arguments ultérieurs sont considérés comme le
reste de l'expression régulière.
La liste de mots-clés de ascmagic appartient probablement
au fichier Magique. Ceci pourrait être fait en utilisant Si aucun chemin n'est mentionné, le répertoire en cours
un mot-clé comme `*' pour la valeur de déplacement. sert de point de départ.
Une autre optimisation pourrait être de réordonner le Si aucune expression n'est fournie, find utilise l'expres-
fichier magique de sorte que l'on puisse passer les tests sion `-print' par défaut.
pour le premier octet, le premier mot, etc., une fois
qu'on l'a trouvé. Se plaindre des conflits dans les find se termine avec le code de retour 0 si tous les
entrées du fichier magique. Eventuellement créer une règle fichiers ont pu être examinés correctement, et supérieur à
de sorte que les entrées soient triées sur base du 0 si une erreur s'est produite.
déplacement par rapport au début du fichier plutôt que sur
la position à l'intérieur du fichier magique. EXPRESSIONS
L'expression est constituée d'options (affectant l'ensem-
Le programme devrait fournir un moyen d'estimer le degré ble des opérations plutôt que le traitement d'un fichier
d'exactitude d'une supposition. particulier, et renvoyant toujours vrai), de tests (ren-
voyant une valeur vraie ou fausse), et d'actions (ayant
des effets de bords et renvoyant une valeur vraie ou toire, il sait qu'il y a 2 fois moins de sous-
fausse), tous ces éléments étant séparés par des répertoires que de liens vers le répertoire. Une
opérateurs. fois qu'il a rencontré le nombre prévu de sous-
répertoires, il est donc sûr que le reste des
Quand un opérateur est manquant, l'opération par défaut entrées est constitué de fichiers autres que des
-and est appliquée. Si l'expression ne contient pas sous-répertoires. Ces fichiers sont des feuilles
d'action autre que -prune, find applique l'action -print ([NDT] `leaf') dans l'arborescence des répertoires.
par défaut sur tous les fichiers pour lesquels l'expres- S'il n'y a que les noms de fichiers à examiner, il
sion est vraie. n'a plus besoin de vérifier leur nature, et ceci
fournit une augmentation notable de la vitesse de
OPTIONS traitement.
Toutes les options renvoient toujours la valeur vraie.
Elles ont toujours un effet global, plutôt que de s'appli- -version, --version
quer uniquement à leur emplacement dans l'expression. Afficher un numéro de version sur la sortie stan-
Néanmoins, pour améliorer la lisibilité, il est préférable dard et terminer normalement.
de les placer au début de l'expression.
-xdev Ne pas parcourir les répertoires situés sur
-daystart d'autres systèmes de fichiers.
Mesurer les temps (avec -amin, -atime, -cmin,
-ctime, -mmin, et -mtime) depuis le début de la TESTS
journée plutot que depuis 24 heures. Les arguments numériques peuvent être indiqués comme suit:
-mindepth n -cmin n
Ne pas appliquer les tests ou les actions à des dernière modification du statut du fichier il y a n
niveaux de profondeur inférieurs à n. n est un minutes.
entier positif ou nul. `-mindepth 1' signifie que
les tests et les actions s'appliquent à tous les -cnewer file
fichiers sauf aux arguments de la ligne de com- dernière modification du statut du fichier plus
mande. récente que la dernière modification du fichier
file. Le comportement de l'option -cnewer est mod-
-mount Ne pas parcourir les répertoires situés sur ifié par l'option -follow uniquement si celle-ci la
d'autres systèmes de fichiers. Il s'agit d'une précède sur la ligne de commande.
alternative à l'option -xdev, assurant la compati-
bilité avec d'anciennes versions de find. -ctime n
dernière modification du statut du fichier il y a
-noleaf n*24 heures.
Ne pas faire d'optimisation en supposant que les
répertoires contiennent 2 fois moins de sous-réper- -empty fichier vide. De plus ce fichier doit être régulier
toires que leurs nombres de liens physiques. Cette ou être un répertoire.
option est nécéssaires lorsque l'on parcourt des
systèmes de fichiers ne suivant pas les conventions -false toujours faux.
Unix sur les liens de répertoires, comme les
systèmes MS-DOS, les CD-ROM ou les points de mon- -fstype type
tage de volumes AFS. Chaque répertoire sur un fichier se trouvant sur un système de fichiers du
système de fichiers Unix dispose au moins de deux type indiqué. Les types de systèmes de fichiers
liens physiques, son nom et `.'. De plus chaque dépendent de la version d'Unix. Une liste non-
sous-répertoire a également un lien `..' vers le exhaustive des systèmes acceptés sur certaines ver-
répertoire parent. Quand find examine un réper- sions d'Unix sont : ufs, 4.2, 4.3, nfs, tmp, mfs,
!
S51K, S52K. Vous pouvez utiliser -printf avec la Fichier dont l'U-ID numérique ne correspond à aucun
directive %F pour examiner les types de vos utilisateur.
systèmes de fichiers.
-nogroup
-gid n Fichier de GID numérique valant n. Fichier dont le G-ID numérique ne correspond à
aucun groupe d'utilisateurs.
-group nom_groupe
fichier appartenant au groupe nom_groupe -path motif
(éventuellement ID numérique). Fichier dont le nom complet correspond au motif
fourni. Lors du développement des méta-caractères,
-ilname motif `/' et `.' ne sont pas traités différement des
identique à -lname, mais sans différencier les autres caractères, ainsi par exemple :
majuscules et les minuscules. find . -path './sr*sc'
affichera l'élément de répertoire intitulé
-iname pattern './src/misc' (s'il en existe un). Pour ignorer une
identique à -name, mais sans différencier les arborescence complète de répertoires, utilisez
majuscules et les minuscules. Par exemple les l'option -prune plutôt que de vérifier chaque
motifs `fo*' et `F??' correspondent aux noms de fichier de l'arbre. Par exemple, pour ignorer le
fichiers `Foo', `FOO', `foo', `fOo', etc... répertoire `src/emacs' et tous ses sous-réper-
toires, tout en affichant le nom de tous les autres
-inum n fichiers, faites quelque chose comme :
fichier dont le numéro d'i-noeud est n. find . -path './src/emacs' -prune -o
-print
-ipath motif
identique à -path, mais sans différencier les -perm mode
majuscules et les minuscules. Fichier dont les autorisations d'accès sont fixées
exactement au mode indiqué (en notation symbolique
-iregex motif ou octale). La notation symbolique utilise le mode
identique à -regex, mais sans différencier les 0 comme point de départ.
majuscules et les minuscules.
-perm -mode
-links n Fichier ayant au moins toutes les autorisations
fichier ayant n liens. indiquées dans le mode.
Z fuseau horaire (par exemple MET), ou %f Nom du fichier, sans nom de répertoire.
rien si le fuseau horaire est
indéterminé. %F Type de système de fichiers sur lequel se
trouve le fichier. Cette valeur peut être
Champs de date : utilisée pour l'option -fstype.
' '
0 - No errors
-p supprime l'affichage des fichiers ".plan" et ".pro- 1 - File system errors corrected
ject". 2 - System should be rebooted
4 - File system errors left uncorrected
-m désactive la recherche automatique des noms 8 - Operational error
d'utilisateur. User est généralement un nom de 16 - Usage or syntax error
login; cependant la recherche s'effectue aussi sur 128 - Shared library error
le nom réel si l'on ne spécifie pas l'option -m. The exit code returned when all file systems are checked
La recherche s'effectue sans differencier les using the -A option is the bit-wise OR of the exit codes
majuscules et les minuscules. for each file system that is checked.
Sans options, finger utilise le style d'affichage corre- In actuality, fsck is simply a front-end for the various
spondant à -l s'il y a des opérandes, et -s sinon. Noter file system checkers (fsck.fstype) available under Linux.
que dans les deux formats certains champs peuvent manquer The file system-specific checker is searched for in /sbin
si l'information correspondante n'est pas disponible. first, then in /etc/fs and /etc, and finally in the direc-
tories listed in the PATH environment variable. Please
Sans argument, finger affiche les informations concernant see the file system-specific checker manual pages for fur-
tous les utilisateurs actuellement connectés. ther details.
HISTORIQUE -t fslist
La commande finger est apparue dans BSD 3.0. Specifies the type(s) of file system to be checked.
When the -A flag is specified, only filesystems
that match fslist are checked. The fslist parame-
ter is a comma-separated list of filesystems and
TRADUCTION options specifiers. All of the filesystems in this
Michel Quercia, 1997. comma-separated list may be prefixed by a negation
operator 'no' or '!', which requests that only
those filesystems not listed in fslist will be
checked. If all of the filesystems in fslist are
BSD Expérimental 24 Mai 1997 FINGER(1) not prefixed by a negation operator, then only
those filesystems listed in fslist will be checked.
' '!
-A Walk through the /etc/fstab file and try to check Options and arguments which follow the -- are
all file systems in one run. This option is typi- treated as file system-specific options to be
cally used from the /etc/rc system initalization passed to the file system-specific checker.
file, instead of multiple commands for checking a
single file system. Please note that fsck is not designed to pass arbi-
trarily complicated options to filesystem-specific
The root filesystem will be checked first unless checkers. If you're doing something complicated,
the -P option is specified (see below). After please just execute the filesystem-specific checker
that, filesystems will be checked in the order directly. If you pass fsck some horribly compli-
specified by the fs_passno (the sixth) field in the cated option and arguments, and it doesn't do what
/etc/fstab file. Filesystems with a fs_passno you expect, don't bother reporting it as a bug.
value of 0 are skipped and are not checked at all. You're almost certainly doing something that you
Filesystems with a fs_passno value of greater than shouldn't be doing with fsck.
zero will be checked in order, with filesystems
with filesystems with the lowest fs_passno number Currently, standardized file system-specific options are
being checked first. If there are multiple somewhat in flux. Although not guaranteed, the following
filesystems with the same pass number, fsck will options are supported by most file system checkers:
attempt to check them in parallel, although it will
avoid running multiple filesystem checks on the -a Automatically repair the file system without any
same physical disk. questions (use this option with caution). Note
that e2fsck(8) supports -a for backwards compati-
Hence, a very common configuration in /etc/fstab bility only. This option is mapped to e2fsck's -p
files is to set the root filesystem to have a option which is safe to use, unlike the -a option
fs_passno value of 1 and to set all filesystems to that most file system checkers support.
have a fs_passno value of 2. This will allow fsck
to automatically run filesystem checkers in paral- -r Interactively repair the filesystem (ask for con-
lel if it is advantageous to do so. System admin- firmations). Note: It is generally a bad idea to
istrators might choose not to use this configura- use this option if multiple fsck's are being run in
tion if they need to avoid multiple filesystem parallel. Also note that this is e2fsck's default
checks running in parallel for some reason --- for behavior; it supports this option for backwards
example, if the machine in question is short on compatibility reasons only.
memory so that excessive paging is a concern.
AUTHOR
-C Display completion/progress bars for those filesys- Theodore Ts'o (tytso@mit.edu)
tems checkers (currently only for ext2) which sup-
port them. Fsck will manage the filesystem check- FILES
ers so that only one of them will display a /etc/fstab.
progress bar at a time.
ENVIRONMENT VARIABLES
-N Don't execute, just show what would be done. The fsck program's behavior is affected by the following
environment variables:
-P When the -A flag is set, check the root filesystem
in parallel with the other filesystems. This is FSCK_FORCE_ALL_PARALLEL
not the safest thing in the world to do, since if If this environment variable is set, fsck will
the root filesystem is in doubt things like the attempt to run all of the specified filesystems in
e2fsck(8) executable might be corrupted! This parallel, regardless of whether the filesystems
option is mainly provided for those sysadmins who appear to be on the same device. (This is useful
don't want to repartition the root filesystem to be for RAID systems or high-end storage systems such
small and compact (which is really the right solu- as those sold by companies such as IBM or EMC.)
tion).
FSCK_MAX_INST
-R When checking all file systems with the -A flag, This environment variable will limit the maximum
skip the root file system (in case it's already number of file system checkers that can be running
mounted read-write). at one time. This allows configurations which have
a large number of disks to avoid fsck starting too
-T Don't show the title on startup. many file system checkers at once, which might
overload CPU and memory resources available on the
-V Produce verbose output, including all file system- system. If this value is zero, then an unlimited
specific commands that are executed. number of processes can be spawned. This is cur-
rently the default, but future versions of fsck may
fsck-options attempt to automatically determine how many file
Options which which are not understood by fsck are system checks can be run based on gathering
passed to the filesystem-specific checker. These accounting data from the operating system.
arguments must not take arguments, as there is no
way for fsck to be able to properly guess which PATH The PATH environment variable is used to find file
arguments take options and which don't. system checkers. A set of system directories are
searched first: /sbin, /sbin/fs.d, /sbin/fs,
' ''
/etc/fs, and /etc. Then the set of directories -A num Afficher num lignes supplémentaires après la ligne
found in the PATH environment are searched. correspondante.
-B num Afficher num lignes supplémentaires avant la ligne
FSTAB_FILE correspondante.
This environment variable allows the system admin- -C est équivalent à -2.
istrator to override the standard location of the -V Afficher le numéro de version de grep sur la sortie
/etc/fstab file. It is also use for developers who d'erreur standard. Ce numéro de version devra être
are testing fsck. inclus dans tous les rapports de bugs (voir plus
bas).
SEE ALSO -b Avant chaque ligne, afficher son décalage (en
fstab(5), mkfs(8), fsck.minix(8), fsck.ext2(8) or octet) au sein du fichier d'entrée.
e2fsck(8), fsck.xiafs(8). -c Ne pas afficher les résultats normaux. A la place,
afficher un compte des lignes correspondantes pour
chaque fichier d'entrée. Avec l'option -v (voir
plus bas), afficher les nombres de lignes ne corre-
E2fsprogs version 1.27 March 2002 FSCK(8) spondant pas au motif.
-e motif
Utiliser le motif indiqué. Ceci permet de protéger
les motifs commençant par -.
-f fichier
Lire le motif dans le fichier indiqué.
% % -h Ne pas afficher le nom des fichiers dans les résul-
tats lorsque plusieurs fichiers sont parcourus.
-i Ignorer les différences majuscules/minuscules aussi
bien dans le motif que dans les fichiers d'entrée.
([NDT] Comme toujours, ceci ne fonctionne pas avec
NOM les caractères accentués...)
grep, egrep, fgrep - Afficher les lignes correspondant à -L Ne pas afficher les résultats normaux. A la place,
un motif donné. indiquer le nom des fichiers pour lesquels aucun
résultat n'aurait été affiché.
SYNOPSIS -l Ne pas afficher les résultats normaux. A la place,
grep [ -[[AB] ]num ] [ -[CEFGVBchilnsvwx] ] [ -e ] motif | indiquer le nom des fichiers pour lesquels des
-ffichier ] [ fichiers... ] résultats auraient été affiches.
-n Ajouter à chaque ligne de sortie un préfixe con-
DESCRIPTION tenant son numéro dans le fichier d'entrée.
Grep Recherche dans les fichiers d'entrée indiqués les -q Silence. Ne pas afficher les résultats normaux.
lignes correspondant à un certain motif. -s Ne pas afficher les messages d'erreurs concernant
les fichiers inexistants ou illisibles.
Si aucun fichier n'est fourni, ou si le nom `-' est men- -v Inverser la mise en correspondance, pour sélection-
tionné, la lecture se fait depuis l'entrée standard. ner les lignes ne correspondant pas au motif.
-w Ne sélectionner que les lignes contenant une corre-
Par défaut, grep affiche les lignes correspondant au spondance formant un mot complet. La sous-chaîne
motif. correspondante doit donc être soit au début de la
ligne, soit précédée d'un caractère n'appartenant
Il existe trois variantes principales de grep, controlées pas à un mot. De même elle doit se trouver soit à
par les options suivantes. la fin de la ligne, soit être suivie par un car-
actère n'appartenant pas à un mot. Les caractères
-G Interprète le motif comme une expression régulière composants les mots sont les lettres, les chiffres
simple (voir plus bas). C'est le comportement par et le souligné (`_'). ([NDT] Bien entendu les
défaut. minuscules accentuées ne sont pas des lettres !
-E Interprète le motif comme une expression régulière elles servent donc à séparer les mots...)
étendue (voir plus bas). -x Ne sélectionner que les correspondances qui occu-
-F Interprète le motif comme une liste de chaînes pent une ligne entière.
figées, séparées par des Sauts de Lignes (NewLine).
La correspondance est faite avec n'importe laquelle EXPRESSIONS RÉGULIÈRES
de ces chaînes. Une expression régulière est un motif qui permet de
décrire un ensemble de chaînes. Les expressions régulières
De plus, il existe deux variantes du programme : egrep et sont construites comme des opérations arithmétiques, en
fgrep. Egrep est similaire (sans être identique) à utilisant des opérateurs divers pour combiner des expres-
grep -E, et est compatible avec les versions UNIX his- sions plus petites.
toriques de egrep. Fgrep est identique à grep -F.
Grep comprend deux versions différentes pour la syntaxe
Toutes les variantes de grep acceptent les options suiv- des expressions régulières : ``simple'' et ``étendue.''
antes : Dans la version GNU de grep, il n'y a pas de différence
-num Les correspondances seront affichées avec num dans les fonctionnalités disponibles en utilisant l'une ou
lignes supplémentaires avant et après. Néanmoins, l'autre des syntaxes. Dans d'autres implémentations, les
grep n'affichera jamais une ligne plus d'une fois. expressions régulières simples sont moins puissantes. La
'- '&
description ci-dessous correspond aux expressions éten- {,m} L'élément précédent est facultatif et doit être mis
dues, les différences avec les expressions simples étant en correspondance m fois au plus.
résumées ensuite. {n,m} L'élément précédent doit être mis en correspondance
au moins n fois, mais au plus m fois.
Les briques élémentaires sont les expressions régulières
correspondant à un simple caractère. La plupart des car- Deux expressions régulières peuvent être juxtaposées,
actères, y compris toutes les lettres et les chiffres, l'expression en résultant correspondra à toute chaîne
sont des expressions régulières se correspondant à eux- formée par la juxtaposition de deux sous-chaînes corre-
mêmes. Tout méta-caractère ayant une signification spondant respectivement aux deux sous-expression.
spéciale doit être protégé en le faisant précéder d'un
BackSlash. Deux expressions régulières peuvent être reliées par
l'opérateur infixe |; l'expression résultante correspondra
Une liste de caractères, encadrée par [ et ] peut être à toute chaîne correspondant à l'une ou l'autre des deux
mise en correspondance avec n'importe quel caractère sous-expressions.
unique appartenant à la liste. Si le premier caractère de
la liste est l'accent circonflexe ^ alors la mise en cor- Les répétitions ont priorité sur les juxtapositions, qui à
respondance se fait avec n'importe quel caractère absent leur tour ont priorité sur les alternatives. Une sous-
de la liste. Par exemple, l'expression régulière expression peut être entourée par des parenthèses pour
[0123456789] convient pour n'importe quel chifre unique. modifier ces règles de précédence.
Un intervalle de caractères ASCII peut être indiqué en La référence inverse \n, ou n est un chiffre, correspond à
donnant le premier et le dernier caractère séparés par un la sous-chaîne déjà mise en correspondance avec la nième
tiret. sous-expression régulière entre parenthèses.
Finalement il existe certaines classes de caractères Dans les expressions régulières simples, les méta-car-
prédéfinies. Leurs noms sont assez explicites : actères ?, +, {, |, (, et ) perdent leurs significations
[:alnum:], [:alpha:], [:cntrl:], [:digit:] (chiffres), spéciales, il faut utiliser à la place leurs versions avec
[:graph:], [:lower:] (minuscules), [:print:] (affich- BackSlash \?, \+, \{, \|, \(, et \).
ables), [:punct:], [:space:], [:upper:] (majuscules), et
[:xdigit:] (chiffres héxadécimaux). par exemple, Dans egrep le méta-caractère { perd sa signification
[[:alnum:]] correspond à [0-9A-Za-z], à la différence que spéciale, il faut utiliser \{ à la place.
le dernier dépend de l'encodage ASCII, alors que le pre-
mier est plus portable. Remarquez que les crochets dans DIAGNOSTIQUE
les noms de classes font partie intégrante du nom symbol- Normalement, le code de retour est 0 si des correspon-
ique, et qu'ils doivent donc être inclus en plus des cro- dances ont été trouvées, et 1 si aucune correspondance n'a
chets encadrant la liste. La plupart des méta-caractères été faite. L'option -v inverse le sens du code de retour.
perdent leurs significations spéciales au sein des listes. Le code de retour correspond à des erreurs de syntaxe dans
Pour inclure un ] littéral, mettez-le en premier dans la le motif, des fichiers d'entrée inaccessibles, ou d'autres
liste. De même, pour inclure un ^ littéral, placez-le erreurs système.
n'importe ou sauf au début de la liste. Enfin, pour
inclure un - placez-le en dernier. BOGUES
Envoyez les rapports de bug ([NDT] en anglais !) à bug-
Le point . correspond à n'importe quel caractère unique. gnu-utils@prep.ai.mit.edu. Assurez-vous d'inclure le mot
Le symbole \w est un synonyme de [[:alnum:]] et \W un syn- ``grep'' quelque part dans le champ ``Subject:''.
onyme de [^[:alnum]].
Dans les constructions {m,n} de grandes valeurs de
L'accent circonflexe ^ et le symbole dollar $ sont des répétition peuvent pousser grep à utiliser beaucoup de
méta-caratères correspondant respectivement à une chaîne mémoire. De plus, certaines autres expressions régulières
vide au début et en fin de ligne. Les symboles \< et \> obscures peuvent prendre un temps exponentiellement long,
correspondent respectivement à une chaîne vide en début et et mener à un manque de mémoire.
en fin de mot. Le symbole \b correspond à une chaîne vide
à l'extrémité d'un mot, et \B correspond à une chaîne vide Les références inverses sont très lentes et peuvent néces-
ne se trouvant pas à une extrémité de mot. siter un temps exponentiellement long.
DESCRIPTION CAVEATS
The groupadd command creates a new group account using the You may not remove the primary group of any existing user.
values specified on the command line and the default val- You must remove the user before you remove the group.
ues from the system. The new group will be entered into
the system files as needed. The options which apply to FILES
the groupadd command are /etc/group - group information
/etc/gshadow - secure group information
-g gid The numerical value of the group's ID. This value
must be unique, unless the -o option is used. The SEE ALSO
value must be non-negative. The default is to use chfn(1), chsh(1), useradd(8), userdel(8), usermod(8),
the smallest ID value greater than 500 and greater passwd(1), groupadd(8), groupmod(8)
than every other group. Values between 0 and 499
are typically reserved for system accounts. AUTHOR
Julianne Frances Haugh (jfh@austin.ibm.com)
-r This flag instructs groupadd to add a system
account. The first available gid lower than 499
will be automatically selected unless the -g option
is also given on the command line.
This is an option added by Red Hat.
- -
-N. C'est utile quand le nom du fichier compressé a été compressé est légèrement plus grand que l'original.
tronqué ou quand l'horodate n'a pas été préservée lors L'expansion dans le pire des cas est de quelques octets
d'un transfert de fichier. pour l'entête du fichier gzip, plus 5 octets tous les
blocs de 32Ko, ou une expansion de 0.015% pour les grands
Les fichiers compressés peuvent être restaurés dans leur fichiers. Notez que le nombre de blocs de disque réelle-
forme originale en utilisant gzip -d ou gunzip ou bien ment utilisé n'augmente presque jamais. gzip préserve les
encore zcat. Si le nom original sauvé dans le fichier modes, permissions et horodates des fichiers pendant la
compressé ne convient pas à son système de fichiers, un compression ou la décompression.
nouveau nom est construit à partir de l'original pour le
rendre conforme.
OPTIONS
gunzip prend une liste de fichiers sur la ligne de comman- -a --ascii
des et remplace chaque fichier dont le nom se termine par Mode texte ascii : convertit les fins de lignes en
.gz, -gz, .z, -z, _z or .Z, et qui commence par le nombre utilisant les conventions locales. Cette option
magique correct, par un fichier décompressé sans l'exten- n'est supportée que sur les systèmes non Unix. Pour
sion originale. gunzip reconnaît également les extensions MSDOS, CR LF est converti en LF pendant la compres-
spéciales .tgz et .taz comme des raccourcis pour .tar.gz sion, et LF est converti en CR LF pendant la décom-
et .tar.Z respectivement. Pendant la compression, gzip pression.
utilise l'extension .tgz si nécessaire au lieu de tronquer
un fichier d'extension .tar . -c --stdout --to-stdout
Ecrire la sortie sur la sortie standard ; garder
gunzip peut actuellement décompresser les fichiers créés les fichiers originaux non modifiés. S'il y a de
par gzip, zip, compress, compress -H ou pack. La détec- multiples fichiers, la sortie consiste en une
tion du format d'entrée se fait automatiquement. Quand il séquence de membres compressés indépendamment. Pour
utilise les deux premiers formats, gunzip vérifie un CRC obtenir une meilleure compression, gzip concatène
32 bit. Pour pack, gunzip vérifie la longueur du fichier tous les fichiers d'entrées avant de les com-
décompressé. Le format compress standard n'a pas été prévu presser.
pour permettre des contrôles de cohérence. Néanmoins, gun-
zip est quelquefois capable de détecter un fichier .Z -d --decompress --uncompress
défectueux. Si vous obtenez une erreur durant la décom- Décompresser.
pression d'un fichier .Z, ne supposez pas que le fichier
.Z est correct uniquement parce que l'uncompress standard -f --force
ne se plaint pas. Cela signifie en général que l'uncom- Forcer la compression ou la décompression même si
press standard ne vérifie pas son entrée, et génère une le fichier est cible de plusieurs liens durs, ou si
sortie "dégradée" sans s'en offusquer. Le format -H du le fichier correspondant existe, ou encore si les
compress de SCO (méthode de compression LZH) n'inclut pas données compressées sont lues ou écrites à partir
de CRC mais permet tout de même quelques tests de d'un terminal. Si les données d'entrée ne sont pas
cohérence. dans un format reconnu par gzip, et si l'option
--stdout est également fournie, copier les données
Les fichiers créés par zip ne peuvent être décompressés en entrée sans modification sur la sortie standard
par gzip que s'ils n'ont qu'un seul membre compressé avec : laisser zcat se comporter comme cat. Si -f n'est
la méthode de "dégonflement". Cette caractéristique n'est pas donné, et quand il ne tourne pas en
prévue que pour faciliter la conversion de fichiers arrière-plan, gzip interroge l'utilisateur pour
.tar.zip au format .tar.gz. Pour extraire des fichiers zip vérifier si un fichier existant doit être écrasé ou
contenant plusieurs membres, utilisez unzip au lieu de non.
gunzip.
-h --help
zcat est identique à gunzip -c. (Sur certains systèmes, Afficher un écran d'aide et se terminer.
zcat peut être installé en tant que gzcat pour préserver
le lien original vers compress.) zcat décompresse ou bien -l --list
une liste de fichiers obtenue à partir de la ligne de com- Pour chaque fichier compressé, afficher les champs
mandes, ou bien son entrée standard, et décompresse les suivants :
données sur la sortie standard. zcat décompressera les
fichiers ayant le nombre magique correct qu'ils aient un compressed size : taille du fichier compressé
suffixe .gz ou non. uncompressed size : taille du fichier décom-
pressé
gzip utilise l'algorithme de Lempel-Ziv utilisé par zip et ratio : coefficient de compression (0.0% si
PKZIP. Le pourcentage de compression obtenu dépend de la inconnu)
taille de l'entrée, et de la distributions des uncompressed_name: nom du fichier décompressé
sous-chaînes de caractères communes. Typiquement, des
fichiers textes du type code source en anglais seront com- La taille du fichier compressé vaut -1 pour les
pressés à hauteur de 60-70%. La compression est en général fichiers n'étant pas au format gzip, comme les
nettement meilleure que celle obtenue par LZW (utilisé par fichiers compressés .Z. Pour obtenir la taille
compress), le codage de Huffman (utilisé dans pack), ou le décompressée pour de tels fichiers, vous pouvez
codage de Huffman adaptatif (compact). utiliser :
-N --name Alors
Pendant la compression, toujours sauver les noms et gunzip -c foo
horodates des fichiers originaux; c'est le com-
portement par défaut. Pendant la décompression, est équivalent à
restaurer le nom du fichier original et son horo-
date s'ils sont présents. Cette option est utile cat file1 file2
sur les systèmes ayant une limite sur la longueur
des noms de fichiers ou quand l'horodate a été per- Dans le cas où un membre d'un fichier .gz est endommagé,
due lors d'un transfert de fichier. les autres membres peuvent toujours être récupérés (si le
membre endommagé est supprimé). Néanmoins, vous pouvez
-q --quiet obtenir une meilleur compression en compressant tous les
Supprimer tous les avertissements. membres ensemble :
Sur Vax/VMS, le nom de la variable d'environnement est- pour sh: GZIP="-q" tar -xfz --block-compress /dev/rst0
GZIP_OPT, pour éviter un conflit avec l'ensemble de sym- pour csh: (setenv GZIP -q; tar -xfz --block-compr
boles utilisés lors de l'invocation du programme. /dev/rst0
TRADUCTION
Christophe Blaess, 1997.
FSF 9 Janvier 1997 ID(1L)
# #
NAME
init, telinit - process control initialization
NOM SYNOPSIS
id - Afficher les UIDs et GIDs effectifs et réels. /sbin/init [ -a ] [ -s ] [ -b ] [ -z xxx ] [ 0123456Ss ]
/sbin/telinit [ -t sec ] [ 0123456sSQqabcUu ]
-0 &*
provided that these files exist.
DESCRIPTION
Init CHANGING RUNLEVELS
Init is the parent of all processes. Its primary role is After it has spawned all of the processes specified, init
to create processes from a script stored in the file waits for one of its descendant processes to die, a power-
/etc/inittab (see inittab(5)). This file usually has fail signal, or until it is signaled by telinit to change
entries which cause init to spawn gettys on each line that the system's runlevel. When one of the above three condi-
users can log in. It also controls autonomous processes tions occurs, it re-examines the /etc/inittab file. New
required by any particular system. entries can be added to this file at any time. However,
init still waits for one of the above three conditions to
occur. To provide for an instantaneous response, the
RUNLEVELS telinit Q or q command can wake up init to re-examine the
A runlevel is a software configuration of the system which /etc/inittab file.
allows only a selected group of processes to exist. The
processes spawned by init for each of these runlevels are If init is not in single user mode and receives a power-
defined in the /etc/inittab file. Init can be in one of fail signal (SIGPWR), it reads the file /etc/powerstatus.
eight runlevels: 0-6 and S or s. The runlevel is changed It then starts a command based on the contents of this
by having a privileged user run telinit, which sends file:
appropriate signals to init, telling it which runlevel to
change to. F(AIL) Power is failing, UPS is providing the power. Exe-
cute the powerwait and powerfail entries.
Runlevels 0, 1, and 6 are reserved. Runlevel 0 is used to
halt the system, runlevel 6 is used to reboot the system, O(K) The power has been restored, execute the
and runlevel 1 is used to get the system down into single powerokwait entries.
user mode. Runlevel S is not really meant to be used
directly, but more for the scripts that are executed when L(OW) The power is failing and the UPS has a low battery.
entering runlevel 1. For more information on this, see the Execute the powerfailnow entries.
manpages for shutdown(8) and inittab(5).
If /etc/powerstatus doesn't exist or contains anything
Runlevels 7-9 are also valid, though not really docu- else then the letters F, O or L, init will behave as if it
mented. This is because "traditional" Unix variants don't has read the letter F.
use them. In case you're curious, runlevels S and s are
in fact the same. Internally they are aliases for the Usage of SIGPWR and /etc/powerstatus is discouraged. Some-
same runlevel. one wanting to interact with init should use the
/dev/initctl control channel - see the source code of the
sysvinit package for more documentation about this.
BOOTING
After init is invoked as the last step of the kernel boot When init is requested to change the runlevel, it sends
sequence, it looks for the file /etc/inittab to see if the warning signal SIGTERM to all processes that are unde-
there is an entry of the type initdefault (see init- fined in the new runlevel. It then waits 5 seconds before
tab(5)). The initdefault entry determines the initial run- forcibly terminating these processes via the SIGKILL sig-
level of the system. If there is no such entry (or no nal. Note that init assumes that all these processes (and
/etc/inittab at all), a runlevel must be entered at the their descendants) remain in the same process group which
system console. init originally created for them. If any process changes
its process group affiliation it will not receive these
Runlevel S or s bring the system to single user mode and signals. Such processes need to be terminated separately.
do not require an /etc/inittab file. In single user mode,
a root shell is opened on /dev/console. TELINIT
/sbin/telinit is linked to /sbin/init. It takes a one-
When entering single user mode, init reads the console's character argument and signals init to perform the appro-
ioctl(2) states from /etc/ioctl.save. If this file does priate action. The following arguments serve as direc-
not exist, init initializes the line at 9600 baud and with tives to telinit:
CLOCAL settings. When init leaves single user mode, it
stores the console's ioctl settings in this file so it can 0,1,2,3,4,5 or 6
re-use them for the next single-user session. tell init to switch to the specified run level.
When entering a multi-user mode for the first time, init a,b,c tell init to process only those /etc/inittab file
performs the boot and bootwait entries to allow file sys- entries having runlevel a,b or c.
tems to be mounted before users can log in. Then all
entries matching the runlevel are processed. Q or q tell init to re-examine the /etc/inittab file.
When starting a new process, init first checks whether the S or s tell init to switch to single user mode.
file /etc/initscript exists. If it does, it uses this
script to start the process. U or u tell init to re-execute itself (preserving the
state). No re-examining of /etc/inittab file hap-
Each time a child terminates, init records the fact and pens. Run level should be one of Ss12345, otherwise
the reason it died in /var/run/utmp and /var/log/wtmp, request would be silently ignored.
& &
more space on the stack. Init can then manipulate the
telinit can also tell init how long it should wait between command line so that ps(1) shows the current run-
sending processes the SIGTERM and SIGKILL signals. The level.
default is 5 seconds, but this can be changed with the -t
sec option.
INTERFACE
telinit can be invoked only by users with appropriate Init listens on a fifo in /dev, /dev/initctl, for mes-
privileges. sages. Telinit uses this to communicate with init. The
interface is not very well documented or finished. Those
The init binary checks if it is init or telinit by looking interested should study the initreq.h file in the src/
at its process id; the real init's process id is always 1. subdirectory of the init source code tar archive.
From this it follows that instead of calling telinit one
can also just use init instead as a shortcut. SIGNALS
Init reacts to several signals:
ENVIRONMENT
Init sets the following environment variables for all its SIGHUP
children: Init looks for /etc/initrunlvl and /var/log/initrun-
lvl. If one of these files exist and contain an
PATH /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin ASCII runlevel, init switches to the new runlevel.
This is for backwards compatibility only! . In the
INIT_VERSION normal case (the files don't exist) init behaves like
As the name says. Useful to determine if a script telinit q was executed.
runs directly from init.
RUNLEVEL SIGUSR1
The current system runlevel. On receipt of this signals, init closes and re-opens
its control fifo, /dev/initctl. Useful for
PREVLEVEL bootscripts when /dev is remounted.
The previous runlevel (useful after a runlevel
switch). SIGINT
Normally the kernel sends this signal to init when
CONSOLE CTRL-ALT-DEL is pressed. It activates the ctrlaltdel
The system console. This is really inherited from action.
the kernel; however if it is not set init will set
it to /dev/console by default. SIGWINCH
The kernel sends this signal when the KeyboardSignal
BOOTFLAGS key is hit. It activates the kbrequest action.
It is possible to pass a number of flags to init from the
boot monitor (eg. LILO). Init accepts the following flags:
CONFORMING TO
-s, S, single Init is compatible with the System V init. It works
Single user mode boot. In this mode /etc/inittab is closely together with the scripts in the directories
examined and the bootup rc scripts are usually run /etc/init.d and /etc/rc{runlevel}.d. If your system uses
before the single user mode shell is started. this convention, there should be a README file in the
directory /etc/init.d explaining how these scripts work.
AUTHOR
Miquel van Smoorenburg (miquels@cistron.nl), initial man-
ual page by Michael Haardt (u31b3hs@pool.informatik.rwth- Linux 8 Juin 1997 KILL(1)
aachen.de).
SEE ALSO
getty(1), login(1), sh(1), runlevel(8), shutdown(8), ( (
kill(1), inittab(5), initscript(5), utmp(5)
SYNOPSIS
last [-R] [-num] [ -n num ] [-adx] [ -f fichier ] [nom...]
[tty...]
lastb [-R] [-num] [ -n num ] [ -f fichier ] [-adx]
[nom...] [tty...]
NOM DESCRIPTION
kill - Envoyer un signal à un processus. Last parcourt le fichier /var/log/wtmp (ou le fichier
indiqué par l'option -f) pour présenter une liste de
SYNOPSIS toutes les connexions et déconnexions des utilisateurs,
kill [ -s signal | -p ] [ -a ] pid ... depuis la création du fichier.
kill -l [ signal ]
Des noms d'utilisateurs ou de terminaux peuvent être
DESCRIPTION spécifiés, afin que last ne montre que les connex-
kill envoie le signal indiqué aux processus mentionnés. Si ions/déconnexions correspondant à ces arguments. Le nom
on ne précise pas de signal, TERM est envoyé. Ce dernier des terminaux peuvent être abrégés, ainsi last 0 est
tuera les processus qui ne l'interceptent pas. équivalent à last tty0.
Si l'on désire tuer des processus qui interceptent TERM, Quand last reçoit un signal SIGINT (engendré par la touche
il peut être necessaire d'envoyer le signal KILL (9), qui d'interruption, généralement Controle-C) ou un signal
ne peut pas être intercepté. SIGQUIT (déclenché par la touche Quit, généralement Cont-
role-\), il indiquera le point où il est arrivé dans le
La plupart des shells modernes ont une commande kill fichier, et dans le cas de SIGINT, last se terminera.
intégrée.
Le pseudo-utilisateur reboot est enregistré à chaque
OPTIONS redémarrage du système, ainsi last reboot affichera une
pid ... liste de toutes les réinitialisations depuis la création
Indique la liste des PID auxquels kill doit envoyer du fichier de journalisation.
un signal. Chaque pid peut être un Id de proces-
sus, ou un nom de processus. Lastb se comporte comme last, mais il utilise le fichier
/var/log/btmp qui journalise toutes les tentatives
-s Indique le signal à envoyer. Celui-ci peut être infructueuses de connexion.
spécifié par son nom ou par son numéro.
OPTIONS
-p Indique que kill doit simplement fournir l'Id du -num Cet argument indique à last le nombre de lignes
processus dont le nom est fourni, sans lui envoyer d'enregistrement à afficher.
de signal.
-n num est équivalent à -num.
-l Affiche une liste des noms de signaux connus. Ceux-
ci sont fournis dans /usr/include/linux/signal.h -R Cet argument empêche l'affichage du champ hostname.
VOIR AUSSI -a Demande à last d'afficher le nom d'hôte en dernière
bash(1), tcsh(1), kill(2), sigvec(2) colonne. Principalement utile en combinaison avec
l'option suivante.
AUTEUR
Inspiré de BSD 4.4. La possibilité de traduire le nom du -d Pour les connexions non-locales, Linux journalise
processus en PID a été ajoutée par Salvatore Valente <sva- le nom d'hôte ainsi que son adresse IP. Avec cette
lente@mit.edu>.
& &'
option, l'adresse IP est à nouveau reconvertie en Julianne Frances Haugh (jfh@austin.ibm.com)
nom d'hôte. Phillip Street
DESCRIPTION
Less is a program similar to more (1), but which allows
( " ( " backward movement in the file as well as forward movement.
Also, less does not have to read the entire input file
before starting, so with large input files it starts up
faster than text editors like vi (1). Less uses termcap
NAME (or terminfo on some systems), so it can run on a variety
lastlog - examine lastlog file of terminals. There is even limited support for hardcopy
terminals. (On a hardcopy terminal, lines which should be
SYNOPSIS printed at the top of the screen are prefixed with a
lastlog [-u login-name] [-t days] caret.)
DESCRIPTION Commands are based on both more and vi. Commands may be
lastlog formats and prints the contents of the last login preceded by a decimal number, called N in the descriptions
log, /var/log/lastlog. The login-name, port, and last below. The number is used by some commands, as indicated.
login time will be printed. The default (no flags) causes
lastlog entries to be printed, sorted by the numerical
UID. Entering -u login-name flag will cause the lastlog COMMANDS
record for login-name only to be printed. Entering -t In the following descriptions, ^X means control-X. ESC
days will cause only the lastlogins more recent than days stands for the ESCAPE key; for example ESC-v means the two
to be printed. The -t flag overrides the use of -u. character sequence "ESCAPE", then "v".
If the user has never logged in the message "**Never h or H Help: display a summary of these commands. If you
logged in**" will be displayed instead of the port and forget all the other commands, remember this one.
time.
SPACE or ^V or f or ^F
FILES Scroll forward N lines, default one window (see
/var/log/lastlog - lastlog logging file option -z below). If N is more than the screen
size, only the final screenful is displayed. Warn-
CAVEATS ing: some systems use ^V as a special literaliza-
Large gaps in uid numbers will cause the lastlog program tion character.
to run longer with no output to the screen (i.e. if
mmdf=800 and last uid=170, program will appear to hang as z Like SPACE, but if N is specified, it becomes the
it processes uid 171-799). new window size.
AUTHORS ESC-SPACE
&- &&
Like SPACE, but scrolls a full screenful, even if if N is not specified and standard input, rather
it reaches end-of-file in the process. than a file, is being read.)
R Repaint the screen, discarding any buffered input. ' (Single quote.) Followed by any lowercase letter,
Useful if the file is changing while it is being returns to the position which was previously marked
viewed. with that letter. Followed by another single
quote, returns to the position at which the last
F Scroll forward, and keep trying to read when the "large" movement command was executed. Followed by
end of file is reached. Normally this command a ^ or $, jumps to the beginning or end of the file
would be used when already at the end of the file. respectively. Marks are preserved when a new file
It is a way to monitor the tail of a file which is is examined, so the ' command can be used to switch
growing while it is being viewed. (The behavior is between input files.
similar to the "tail -f" command.)
^X^X Same as single quote.
g or < or ESC-<
Go to line N in the file, default 1 (beginning of /pattern
file). (Warning: this may be slow if N is large.) Search forward in the file for the N-th line con-
taining the pattern. N defaults to 1. The pattern
G or > or ESC-> is a regular expression, as recognized by ed. The
Go to line N in the file, default the end of the search starts at the second line displayed (but see
file. (Warning: this may be slow if N is large, or the -a and -j options, which change this).
&0 0*
the last pattern. If the previous search was modi-
Certain characters are special if entered at the fied by ^N, the search is made for the N-th line
beginning of the pattern; they modify the type of NOT containing the pattern. If the previous search
search rather than become part of the pattern: was modified by ^E, the search continues in the
next (or previous) file if not satisfied in the
^N or ! current file. If the previous search was modified
Search for lines which do NOT match the by ^R, the search is done without using regular
pattern. expressions. There is no effect if the previous
search was modified by ^F or ^K.
^E or *
Search multiple files. That is, if the N Repeat previous search, but in the reverse direc-
search reaches the END of the current file tion.
without finding a match, the search contin-
ues in the next file in the command line ESC-n Repeat previous search, but crossing file bound-
list. aries. The effect is as if the previous search
were modified by *.
^F or @
Begin the search at the first line of the ESC-N Repeat previous search, but in the reverse direc-
FIRST file in the command line list, regard- tion and crossing file boundaries.
less of what is currently displayed on the
screen or the settings of the -a or -j ESC-u Undo search highlighting. Turn off highlighting of
options. strings matching the current search pattern. If
highlighting is already off because of a previous
^K Highlight any text which matches the pattern ESC-u command, turn highlighting back on. Any
on the current screen, but don't move to the search command will also turn highlighting back on.
first match (KEEP current position). (Highlighting can also be disabled by toggling the
-G option; in that case search commands do not turn
^R Don't interpret regular expression metachar- highlighting back on.)
acters; that is, do a simple textual compar-
ison. :e [filename]
Examine a new file. If the filename is missing,
?pattern the "current" file (see the :n and :p commands
Search backward in the file for the N-th line con- below) from the list of files in the command line
taining the pattern. The search starts at the line is re-examined. A percent sign (%) in the filename
immediately before the top line displayed. is replaced by the name of the current file. A
pound sign (#) is replaced by the name of the pre-
Certain characters are special as in the / command: viously examined file. However, two consecutive
percent signs are simply replaced with a single
^N or ! percent sign. This allows you to enter a filename
Search for lines which do NOT match the pat- that contains a percent sign in the name. Simi-
tern. larly, two consecutive pound signs are replaced
with a single pound sign. The filename is inserted
^E or * into the command line list of files so that it can
Search multiple files. That is, if the be seen by subsequent :n and :p commands. If the
search reaches the beginning of the current filename consists of several files, they are all
file without finding a match, the search inserted into the list of files and the first one
continues in the previous file in the com- is examined. If the filename contains one or more
mand line list. spaces, the entire filename should be enclosed in
double quotes (also see the -" option).
^F or @
Begin the search at the last line of the ^X^V or E
last file in the command line list, regard- Same as :e. Warning: some systems use ^V as a spe-
less of what is currently displayed on the cial literalization character. On such systems,
screen or the settings of the -a or -j you may not be able to use ^V.
options.
:n Examine the next file (from the list of files given
^K As in forward searches. in the command line). If a number N is specified,
the N-th next file is examined.
^R As in forward searches.
:p Examine the previous file in the command line list.
ESC-/pattern If a number N is specified, the N-th previous file
Same as "/*". is examined.
+cmd Causes the specified cmd to be executed each time a setenv LESS "-options"
new file is examined. For example, +G causes less
to initially display each file starting at the end or if you use sh:
rather than the beginning.
LESS="-options"; export LESS
V Prints the version number of less being run.
On MS-DOS, you don't need the quotes, but you should
q or Q or :q or :Q or ZZ replace any percent signs in the options string by double
Exits less. percent signs.
0 0!
[MS-DOS only] Sets the color of the text displayed.
The environment variable is parsed before the command x is a single character which selects the type of
line, so command line options override the LESS text whose color is being set: n=normal, s=stand-
environment variable. If an option appears in the LESS out, d=bold, u=underlined, k=blink. color is a
variable, it can be reset to its default value on the com- pair of numbers separated by a period. The first
mand line by beginning the command line option with "-+". number selects the foreground color and the second
selects the background color of the text. A single
For options like -P or -D which take a following string, a number N is the same as N.0.
dollar sign ($) must be used to signal the end of the
string. For example, to set two -D options on MS-DOS, you -e or --quit-at-eof
must have a dollar sign between them, like this: Causes less to automatically exit the second time
it reaches end-of-file. By default, the only way
LESS="-Dn9.1$-Ds4.1" to exit less is via the "q" command.
-E or --QUIT-AT-EOF
-? or --help Causes less to automatically exit the first time it
This option displays a summary of the commands reaches end-of-file.
accepted by less (the same as the h command).
(Depending on how your shell interprets the ques- -f or --force
tion mark, it may be necessary to quote the ques- Forces non-regular files to be opened. (A non-reg-
tion mark, thus: "-\?".) ular file is a directory or a device special file.)
Also suppresses the warning message when a binary
-a or --search-skip-screen file is opened. By default, less will refuse to
Causes searches to start after the last line dis- open non-regular files.
played on the screen, thus skipping all lines dis-
played on the screen. By default, searches start -F or --quit-if-one-screen
at the second line on the screen (or after the last Causes less to automatically exit if the entire
found line; see the -j option). file can be displayed on the first screen.
-c or --clear-screen -i or --ignore-case
Causes full screen repaints to be painted from the Causes searches to ignore case; that is, uppercase
top line down. By default, full screen repaints and lowercase are considered identical. This
are done by scrolling from the bottom of the option is ignored if any uppercase letters appear
screen. in the search pattern; in other words, if a pattern
contains uppercase letters, then that search does
-C or --CLEAR-SCREEN not ignore case.
The -C option is like -c, but the screen is cleared
before it is repainted. -I or --IGNORE-CASE
Like -i, but searches ignore case even if the pat-
-d or --dumb tern contains uppercase letters.
The -d option suppresses the error message normally
displayed if the terminal is dumb; that is, lacks -jn or --jump-target=n
some important capability, such as the ability to Specifies a line on the screen where the "target"
clear the screen or scroll backward. The -d option line is to be positioned. A target line is the
does not otherwise change the behavior of less on a object of a text search, tag search, jump to a line
dumb terminal). number, jump to a file percentage, or jump to a
marked position. The screen line is specified by a
-Dxcolor or --color=xcolor number: the top line on the screen is 1, the next
0 0'
is 2, and so on. The number may be negative to start at the first occurrence of pattern in the
specify a line relative to the bottom of the file.
screen: the bottom line on the screen is -1, the
second to the bottom is -2, and so on. If the -j -Pprompt or --prompt=prompt
option is used, searches begin at the line immedi- Provides a way to tailor the three prompt styles to
ately after the target line. For example, if "-j4" your own preference. This option would normally be
is used, the target line is the fourth line on the put in the LESS environment variable, rather than
screen, so searches begin at the fifth line on the being typed in with each less command. Such an
screen. option must either be the last option in the LESS
variable, or be terminated by a dollar sign. -Ps
-J or --status-column followed by a string changes the default (short)
Displays a status column at the left edge of the prompt to that string. -Pm changes the medium (-m)
screen. The status column is used only if the -w prompt. -PM changes the long (-M) prompt. -Ph
or -W option is in effect. changes the prompt for the help screen. -P=
changes the message printed by the = command. All
-kfilename or --lesskey-file=filename prompt strings consist of a sequence of letters and
Causes less to open and interpret the named file as special escape sequences. See the section on
a lesskey (1) file. Multiple -k options may be PROMPTS for more details.
specified. If the LESSKEY or LESSKEY_SYSTEM envi-
ronment variable is set, or if a lesskey file is -q or --quiet or --silent
found in a standard place (see KEY BINDINGS), it is Causes moderately "quiet" operation: the terminal
also used as a lesskey file. bell is not rung if an attempt is made to scroll
past the end of the file or before the beginning of
-m or --long-prompt the file. If the terminal has a "visual bell", it
Causes less to prompt verbosely (like more), with is used instead. The bell will be rung on certain
the percent into the file. By default, less other errors, such as typing an invalid character.
prompts with a colon. The default is to ring the terminal bell in all
such cases.
-M or --LONG-PROMPT
Causes less to prompt even more verbosely than -Q or --QUIET or --SILENT
more. Causes totally "quiet" operation: the terminal bell
is never rung.
-n or --line-numbers
Suppresses line numbers. The default (to use line -r or --raw-control-chars
numbers) may cause less to run more slowly in some Causes "raw" control characters to be displayed.
cases, especially with a very large input file. The default is to display control characters using
Suppressing line numbers with the -n option will the caret notation; for example, a control-A (octal
avoid this problem. Using line numbers means: the 001) is displayed as "^A". Warning: when the -r
line number will be displayed in the verbose prompt option is used, less cannot keep track of the
and in the = command, and the v command will pass actual appearance of the screen (since this depends
the current line number to the editor (see also the on how the screen responds to each type of control
discussion of LESSEDIT in PROMPTS below). character). Thus, various display problems may
result, such as long lines being split in the wrong
-N or --LINE-NUMBERS place.
Causes a line number to be displayed at the begin-
ning of each line in the display. -R or --RAW-CONTROL-CHARS
Like -r, but tries to keep track of the screen
-ofilename or --log-file=filename appearance where possible. This works only if the
Causes less to copy its input to the named file as input consists of normal text and possibly some
it is being viewed. This applies only when the ANSI "color" escape sequences, which are sequences
input file is a pipe, not an ordinary file. If the of the form:
file already exists, less will ask for confirmation
before overwriting it. ESC [ ... m
LEFTARROW [ ESC-h ]
Move the cursor one space to the left. KEY BINDINGS
You may define your own less commands by using the program
RIGHTARROW [ ESC-l ] lesskey (1) to create a lesskey file. This file specifies
Move the cursor one space to the right. a set of command keys and an action associated with each
key. You may also use lesskey to change the line-editing
^LEFTARROW [ ESC-b or ESC-LEFTARROW ] keys (see LINE EDITING), and to set environment variables.
(That is, CONTROL and LEFTARROW simultaneously.) If the environment variable LESSKEY is set, less uses that
Move the cursor one word to the left. as the name of the lesskey file. Otherwise, less looks in
a standard place for the lesskey file: On Unix systems,
^RIGHTARROW [ ESC-w or ESC-RIGHTARROW ] less looks for a lesskey file called "$HOME/.less". On
(That is, CONTROL and RIGHTARROW simultaneously.) MS-DOS and Windows systems, less looks for a lesskey file
Move the cursor one word to the right. called "$HOME/_less", and if it is not found there, then
looks for a lesskey file called "_less" in any directory
HOME [ ESC-0 ] specified in the PATH environment variable. On OS/2 sys-
Move the cursor to the beginning of the line. tems, less looks for a lesskey file called
"$HOME/less.ini", and if it is not found, then looks for a
END [ ESC-$ ] lesskey file called "less.ini" in any directory specified
Move the cursor to the end of the line. in the INIT environment variable, and if it not found
there, then looks for a lesskey file called "less.ini" in
BACKSPACE any directory specified in the PATH environment variable.
Delete the character to the left of the cursor, or See the lesskey manual page for more details.
cancel the command if the command line is empty.
A system-wide lesskey file may also be set up to provide
DELETE or [ ESC-x ] key bindings. If a key is defined in both a local lesskey
Delete the character under the cursor. file and in the system-wide file, key bindings in the
local file take precedence over those in the system-wide
^BACKSPACE [ ESC-BACKSPACE ] file. If the environment variable LESSKEY_SYSTEM is set,
(That is, CONTROL and BACKSPACE simultaneously.) less uses that as the name of the system-wide lesskey
Delete the word to the left of the cursor. file. Otherwise, less looks in a standard place for the
system-wide lesskey file: On Unix systems, the system-wide
^DELETE [ ESC-X or ESC-DELETE ] lesskey file is /usr/local/bin/.sysless. (However, if
(That is, CONTROL and DELETE simultaneously.) less was built with a different binary directory than
Delete the word under the cursor. /usr/local/bin, that directory is where the .sysless file
is found.) On MS-DOS and Windows systems, the system-wide
UPARROW [ ESC-k ] lesskey file is c:\_sysless. On OS/2 systems, the system-
Retrieve the previous command line. wide lesskey file is c:\sysless.ini.
DOWNARROW [ ESC-j ]
Retrieve the next command line. INPUT PREPROCESSOR
You may define an "input preprocessor" for less. Before
TAB Complete the partial filename to the left of the less opens a file, it first gives your input preprocessor
cursor. If it matches more than one filename, the a chance to modify the way the contents of the file are
* *
displayed. An input preprocessor is simply an executable pipe. An input pipe, instead of writing the name of a
program (or shell script), which writes the contents of replacement file on its standard output, writes the entire
the file to a different file, called the replacement file. contents of the replacement file on its standard output.
The contents of the replacement file are then displayed in If the input pipe does not write any characters on its
place of the contents of the original file. However, it standard output, then there is no replacement file and
will appear to the user as if the original file is opened; less uses the original file, as normal. To use an input
that is, less will display the original filename as the pipe, make the first character in the LESSOPEN environment
name of the current file. variable a vertical bar (|) to signify that the input pre-
processor is an input pipe.
An input preprocessor receives one command line argument,
the original filename, as entered by the user. It should For example, on many Unix systems, this script will work
create the replacement file, and when finished, print the like the previous example scripts:
name of the replacement file to its standard output. If
the input preprocessor does not output a replacement file- lesspipe.sh:
name, less uses the original file, as normal. The input #! /bin/sh
preprocessor is not called when viewing standard input. case "$1" in
To set up an input preprocessor, set the LESSOPEN environ- *.Z) uncompress -c $1 2>/dev/null
ment variable to a command line which will invoke your ;;
input preprocessor. This command line should include one esac
occurrence of the string "%s", which will be replaced by
the filename when the input preprocessor command is To use this script, put it where it can be executed and
invoked. set LESSOPEN="|lesspipe.sh %s". When an input pipe is
used, a LESSCLOSE postprocessor can be used, but it is
When less closes a file opened in such a way, it will call usually not necessary since there is no replacement file
another program, called the input postprocessor, which may to clean up. In this case, the replacement file name
perform any desired clean-up action (such as deleting the passed to the LESSCLOSE postprocessor is "-".
replacement file created by LESSOPEN). This program
receives two command line arguments, the original filename
as entered by the user, and the name of the replacement NATIONAL CHARACTER SETS
file. To set up an input postprocessor, set the LESSCLOSE There are three types of characters in the input file:
environment variable to a command line which will invoke
your input postprocessor. It may include two occurrences normal characters
of the string "%s"; the first is replaced with the origi- can be displayed directly to the screen.
nal name of the file and the second with the name of the
replacement file, which was output by LESSOPEN. control characters
should not be displayed directly, but are expected
For example, on many Unix systems, these two scripts will to be found in ordinary text files (such as
allow you to keep files in compressed format, but still backspace and tab).
let less view them directly:
binary characters
lessopen.sh: should not be displayed directly and are not
#! /bin/sh expected to be found in text files.
case "$1" in
*.Z) uncompress -c $1 >/tmp/less.$$ 2>/dev/null A "character set" is simply a description of which charac-
if [ -s /tmp/less.$$ ]; then ters are to be considered normal, control, and binary.
echo /tmp/less.$$ The LESSCHARSET environment variable may be used to select
else a character set. Possible values for LESSCHARSET are:
rm -f /tmp/less.$$
fi ascii BS, TAB, NL, CR, and formfeed are control charac-
;; ters, all chars with values between 32 and 126 are
esac normal, and all others are binary.
lessclose.sh: iso8859
#! /bin/sh Selects an ISO 8859 character set. This is the
rm $2 same as ASCII, except characters between 160 and
255 are treated as normal characters.
To use these scripts, put them both where they can be exe-
cuted and set LESSOPEN="lessopen.sh %s", and LESS- latin1 Same as iso8859.
CLOSE="lessclose.sh %s %s". More complex LESSOPEN and
LESSCLOSE scripts may be written to accept other types of dos Selects a character set appropriate for MS-DOS.
compressed files, and so on.
ebcdic Selects an EBCDIC character set.
It is also possible to set up an input preprocessor to
pipe the file data directly to less, rather than putting koi8-r Selects a Russian character set.
the data into a replacement file. This avoids the need to
decompress the entire file before starting to view it. An next Selects a character set appropriate for NeXT com-
input preprocessor that works this way is called an input puters.
* *!
rather complicated to provide flexibility, but the ordi-
utf-8 Selects the UTF-8 encoding of the ISO 10646 charac- nary user need not understand the details of constructing
ter set. personalized prompt strings.
If the LESSCHARSET environment variable is not set, the A percent sign followed by a single character is expanded
default character set is latin1. However, if the string according to what the following character is:
"UTF-8" is found in the LC_ALL, LC_CTYPE or LANG environ-
ment variables, then the default character set is utf-8 %bX Replaced by the byte offset into the current input
instead. file. The b is followed by a single character
(shown as X above) which specifies the line whose
In special cases, it may be desired to tailor less to use byte offset is to be used. If the character is a
a character set other than the ones definable by LESS- "t", the byte offset of the top line in the display
CHARSET. In this case, the environment variable LESS- is used, an "m" means use the middle line, a "b"
CHARDEF can be used to define a character set. It should means use the bottom line, a "B" means use the line
be set to a string where each character in the string rep- just after the bottom line, and a "j" means use the
resents one character in the character set. The character "target" line, as specified by the -j option.
"." is used for a normal character, "c" for control, and
"b" for binary. A decimal number may be used for repeti- %B Replaced by the size of the current input file.
tion. For example, "bccc4b." would mean character 0 is
binary, 1, 2 and 3 are control, 4, 5, 6 and 7 are binary, %c Replaced by the column number of the text appearing
and 8 is normal. All characters after the last are taken in the first column of the screen.
to be the same as the last, so characters 9 through 255
would be normal. (This is an example, and does not neces- %dX Replaced by the page number of a line in the input
sarily represent any real character set.) file. The line to be used is determined by the X,
as with the %b option.
This table shows the value of LESSCHARDEF which is equiva-
lent to each of the possible values for LESSCHARSET: %D Replaced by the number of pages in the input file,
or equivalently, the page number of the last line
ascii 8bcccbcc18b95.b in the input file.
dos 8bcccbcc12bc5b95.b.
ebcdic 5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b %E Replaced by the name of the editor (from the VISUAL
9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b. environment variable, or the EDITOR environment
iso8859 8bcccbcc18b95.33b. variable if VISUAL is not defined). See the dis-
koi8-r 8bcccbcc18b95.b128. cussion of the LESSEDIT feature below.
latin1 8bcccbcc18b95.33b.
next 8bcccbcc18b95.bb125.bb %f Replaced by the name of the current input file.
If neither LESSCHARSET nor LESSCHARDEF is set, but your %i Replaced by the index of the current file in the
system supports the setlocale interface, less will use list of input files.
setlocale to determine the character set. setlocale is
controlled by setting the LANG or LC_CTYPE environment %lX Replaced by the line number of a line in the input
variables. file. The line to be used is determined by the X,
as with the %b option.
Control and binary characters are displayed in standout
(reverse video). Each such character is displayed in %L Replaced by the line number of the last line in the
caret notation if possible (e.g. ^A for control-A). Caret input file.
notation is used only if inverting the 0100 bit results in
a normal printable character. Otherwise, the character is %m Replaced by the total number of input files.
displayed as a hex number in angle brackets. This format
can be changed by setting the LESSBINFMT environment vari- %pX Replaced by the percent into the current input
able. LESSBINFMT may begin with a "*" and one character file, based on byte offsets. The line used is
to select the display attribute: "*k" is blinking, "*d" is determined by the X as with the %b option.
bold, "*u" is underlined, "*s" is standout, and "*n" is
normal. If LESSBINFMT does not begin with a "*", normal %PX Replaced by the percent into the current input
attribute is assumed. The remainder of LESSBINFMT is a file, based on line numbers. The line used is
string which may include one printf-style escape sequence determined by the X as with the %b option.
(a % followed by x, X, o, d, etc.). For example, if LESS-
BINFMT is "*u[%x]", binary characters are displayed in %s Same as %B.
underlined hexadecimal surrounded by brackets. The
default if no LESSBINFMT is specified is "*s<%X>". %t Causes any trailing spaces to be removed. Usually
used at the end of the string, but may appear any-
where.
PROMPTS
The -P option allows you to tailor the prompt to your %x Replaced by the name of the next input file in the
preference. The string given to the -P option replaces list.
the specified prompt string. Certain characters in the
string are interpreted specially. The prompt mechanism is If any item is unknown (for example, the file size if
* *'
input is a pipe), a question mark is printed instead. ?f%f:Standard input.
The format of the prompt string can be changed depending This prompt prints the filename, if known; otherwise the
on certain conditions. A question mark followed by a sin- string "Standard input".
gle character acts like an "IF": depending on the follow-
ing character, a condition is evaluated. If the condition ?f%f .?ltLine %lt:?pt%pt\%:?btByte %bt:-...
is true, any characters following the question mark and
condition character, up to a period, are included in the This prompt would print the filename, if known. The file-
prompt. If the condition is false, such characters are name is followed by the line number, if known, otherwise
not included. A colon appearing between the question mark the percent if known, otherwise the byte offset if known.
and the period can be used to establish an "ELSE": any Otherwise, a dash is printed. Notice how each question
characters between the colon and the period are included mark has a matching period, and how the % after the %pt is
in the string if and only if the IF condition is false. included literally by escaping it with a backslash.
Condition characters (which follow a question mark) may
be: ?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x..%t
?a True if any characters have been included in the This prints the filename if this is the first prompt in a
prompt so far. file, followed by the "file N of N" message if there is
more than one input file. Then, if we are at end-of-file,
?bX True if the byte offset of the specified line is the string "(END)" is printed followed by the name of the
known. next file, if there is one. Finally, any trailing spaces
are truncated. This is the default prompt. For refer-
?B True if the size of current input file is known. ence, here are the defaults for the other two prompts (-m
and -M respectively). Each is broken into two lines here
?c True if the text is horizontally shifted (%c is not for readability only.
zero).
?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x.:
?dX True if the page number of the specified line is ?pB%pB\%:byte %bB?s/%s...%t
known.
?f%f .?n?m(file %i of %m) ..?ltlines %lt-%lb?L/%L. :
?e True if at end-of-file. byte %bB?s/%s. .?e(END) ?x- Next\: %x.:?pB%pB\%..%t
?f True if there is an input filename (that is, if And here is the default message produced by the = command:
input is not a pipe).
?f%f .?m(file %i of %m) .?ltlines %lt-%lb?L/%L. .
?lX True if the line number of the specified line is byte %bB?s/%s. ?e(END) :?pB%pB\%..%t
known.
The prompt expansion features are also used for another
?L True if the line number of the last line in the purpose: if an environment variable LESSEDIT is defined,
file is known. it is used as the command to be executed when the v com-
mand is invoked. The LESSEDIT string is expanded in the
?m True if there is more than one input file. same way as the prompt strings. The default value for
LESSEDIT is:
?n True if this is the first prompt in a new input
file. %E ?lm+%lm. %f
?pX True if the percent into the current input file, Note that this expands to the editor name, followed by a +
based on byte offsets, of the specified line is and the line number, followed by the file name. If your
known. editor does not accept the "+linenumber" syntax, or has
other differences in invocation syntax, the LESSEDIT vari-
?PX True if the percent into the current input file, able can be changed to modify this default.
based on line numbers, of the specified line is
known.
SECURITY
?s Same as "?B". When the environment variable LESSSECURE is set to 1, less
runs in a "secure" mode. This means these features are
?x True if there is a next input file (that is, if the disabled:
current input file is not the last one).
! the shell command
Any characters other than the special ones (question mark,
colon, period, percent, and backslash) become literally | the pipe command
part of the prompt. Any of the special characters may be
included in the prompt literally by preceding it with a :e the examine command.
backslash.
v the editing command
Some examples:
s -o log files
*- *&
Command line to invoke the (optional) input-post-
-k use of lesskey files processor.
LESSCHARSET
Selects a predefined character set. WARNINGS
The = command and prompts (unless changed by -P) report
LESSCLOSE the line numbers of the lines at the top and bottom of the
*0 *
screen, but the byte and percent of the line after the one
at the bottom of the screen.
NOM
If the :e command is used to name more than one file, and lilo - Installer le chargeur lilo.
one of the named files has been viewed previously, the new
files may be entered into the list in an unexpected order. SYNOPSIS
Fonction principale :
On certain older terminals (the so-called "magic cookie"
terminals), search highlighting will cause an erroneous /sbin/lilo - Installer le chargeur lilo
display. On such terminals, search highlighting is dis-
abled by default to avoid possible problems. Autres utilisations :
In certain cases, when search highlighting is enabled and /sbin/lilo -q - Obtenir la carte des noyaux gérés.
a search pattern begins with a ^, more text than the /sbin/lilo -R - Positionner les attributs par défaut pour
matching string may be highlighted. (This problem does le prochain boot.
not occur when less is compiled to use the POSIX regular /sbin/lilo -I - Rechercher le chemin d'accès au noyau en
expression package.) cours d'utilisation.
/sbin/lilo {-u|-U} - Désinstaller Lilo.
On some systems, setlocale claims that ASCII characters 0
thru 31 are control characters rather than binary charac- DESCRIPTION
ters. This causes less to treat some binary files as lilo installe le chargeur Lilo, qui sera activé au
ordinary, non-binary files. To workaround this problem, prochain démarrage de la machine. Il dispose de nombreuses
set the environment variable LESSCHARSET to "ascii" (or options.
whatever character set is appropriate).
See http://www.flash.net/~marknu/less for the latest list -v Augmente la quantité de commentaires. Ajouter un ou
of known bugs in this version of less. plusieurs -v rendra Lilo de plus en plus volubile.
-P {fix|ignore} AUTEUR
Corrige (fix) ou ignore les tables de partitions Werner Almesberger (almesber@bernina.ethz.ch).
endommagées, c'est à dire les tables dont les
adresses linéaires et secteur/tête/cylindre ne cor-
respondent pas. TRADUCTION
Christophe Blaess, 1997.
-s save-file
Quand lilo écrase le secteur de boot, il sauvegarde
l'ancien contenu dans un fichier, par défaut
/boot/boot.NNNN ou NNNN dépend du périphérique. Lilo 17 Octobre 1996 LILO(8)
Cette option précise un autre fichier de sauvegarde
du secteur de boot. En l'associant avec l'option -u
on indique depuis quel fichier restaurer le
secteur.
-S save-file
Normalement lilo n'écrasera pas un fichier de
sauvegarde existant. Cette option autorise
l'écrasement. NOM
ln - Créer des liens entre fichiers.
-u device-name
Désinstallation de lilo, en recopiant le fichier de SYNOPSIS
sauvegarde sur le secteur de boot. Un horodatage ln [options] source [dest]
du fichier est vérifié. ln [options] source... repertoire
Les lignes de commandes ci-dessus correspondent aux mots Un lien symbolique est d'un tout autre genre. Il s'agit
!
d'un petit fichier spécial, qui contient un chemin -n, --no-dereference
d'accés. Ainsi un lien symbolique peut pointer vers un Lorsque l'on fournit une destination explicite qui
système de fichier différent de celui qui l'accueille. Il se trouve être un répertoire, la considèrer comme
peut également pointer, grâce à NFS, vers un système de un fichier normal.
fichiers appartenant à une autre machine. Enfin, un lien Lorsque la destination est un répertoire réel (et
symbolique ne pointe pas nécéssairement vers un fichier non pas un lien symbolique sur un répertoire), il
existant. Lorsque l'on accède à un lien symbolique (avec n'y a pas d'ambiguïté. Le lien est créé dans ce
les appels systèmes open(2) ou stat(2)), le nom du lien répertoire. Mais lorsque la destination est un lien
symbolique est remplacé, par le noyau Unix, par une symbolique vers un répertoire, il y a deux possi-
référence au fichier vers lequel le lien pointe. Toute- bilités pour traiter la demande. ln peut con-
fois, avec les appels rm(1) et unlink(2) le lien lui-même sidérer la destination comme un répertoire normal,
est supprimé, et non pas le fichier visé. Il existe des et créer le lien dans celui-ci. D'un autre côté, la
appels systèmes spéciaux lstat(2) et readlink(2) qui ren- destination peut également être considérée comme le
voient le status du lien symbolique, et le nom du fichier lien symbolique lui-même à créer. Dans ce cas, ln
vers lequel il pointe. Pour de nombreux autres appels- doit détruire, ou archiver, le lien existant avant
systèmes, il existe une frange d'incertitudes et de varia- de créer le nouveau lien. Le comportement par
tions entre les différents systèmes pour savoir si la défaut est de considérer la destination comme un
fonction s'applique au lien symbolique lui-même, ou au répertoire à part entière.
fichier cible.
-s, --symbolic
ln crée des liens entre fichiers. Par défaut il s'agit de Créer des liens symboliques à la place des liens
liens matériels. Si l'on utilise l'option -s, les liens physiques. Cette option produit souvent des mes-
seront symboliques (logiques). sages d'erreurs sur les systèmes qui ne supportent
pas les liens symboliques.
Si l'on n'indique qu'un seul nom de fichier, un lien vers
ce fichier est créé dans le répertoire courant. Le nom de -v, --verbose
ce lien sera le même que celui du fichier visé (il s'agit Afficher le nom de chaque fichier avant de le lier.
là d'une extension GNU). Sinon, si le dernier argument
indique un répertoire existant, ln créera des liens sur OPTIONS DE SAUVEGARDE GNU
chacun des fichiers source indiqués dans ce répertoire. Les versions GNU des programmes comme cp, mv, ln, install
Les noms seront égaux à ceux des fichiers source visés. et patch créeront au besoin une copie de sauvegarde des
(Consultez toutefois l'options --no-dereference plus bas). fichiers à écraser, à modifier ou à détruire. On demande
Si l'on indique seulement deux noms de fichiers, un lien une copie de sauvegarde à l'aide de l'option -b, on
sera créé avec le nom dest pointant vers le fichier indique la nomenclature à adopter avec l'option -V, et si
source. Il est interdit d'indiquer plus de deux arguments la sauvegarde se fait avec un suffixe, celui-ci est
si le dernier nom n'est pas un répertoire. précisé avec l'option -S.
Par défaut, ln ne supprime pas les fichiers ni les liens -b, --backup
symboliques existants. (Ainsi on peut l'utiliser à des Créer une copie de sauvegarde des fichiers à
fins de verrouillage, il échouera si dest existe déja). écraser ou à détruire.
On peut toutefois forcer l'écrasement avec l'option -f.
-S SUFFIXE, --suffix=SUFFIXE
Avec les implémentations existant actuellement, seul le Ajouter le SUFFIXE indiqué à chaque fichier de
Super-User peut créer un lien matériel sur un répertoire, sauvegarde créé. Si cette option n'est pas
et encore, c'est souvent totalement impossible. POSIX indiquée, on utilisera la valeur de la variable
interdit aux appels-systèmes link(2) et à l'utilitaire ln d'environnement SIMPLE_BACKUP_SUFFIX. Si la vari-
de créer des liens physique sur un répertoire (mais able SIMPLE_BACKUP_SUFFIX n'existe pas, la valeur
n'interdit pas les liens matériels entre différents par défaut est `~'.
systèmes de fichiers).
-V METHODE, --version-control=METHODE
OPTIONS POSIX Préciser la nomenclature des fichiers de sauvegarde
-f Forcer l'écrasement du fichier destination s'il La METHODE indiquée peut être `numbered' (`t'),
existe. `existing' (`nil'), ou `never' (`simple'). Si
cette option n'est pas indiquée, la valeur de la
OPTIONS GNU variable d'environnement VERSION_CONTROL est
-d, -F, --directory utilisée, et si la variable VERSION_CONTROL
Autoriser le Super-User à créer un lien physique n'existe pas, la valeur par défaut est `existing'.
sur un répertoire.
Cette option correspond à la variable `version-con-
-f, --force trol' sous Emacs. Les METHODES valides (les
Forcer l'écrasement du fichier destination s'il abbréviations non-ambigües sont acceptées) sont :
existe.
t, numbered
-i, --interactive Toujours faire une sauvegarde numérotée.
Demander confirmation avant de supprimer les
fichiers destination. nil, existing
Faire une sauvegarde numérotée des fichiers
'
en ayant déjà une précédente, et une sauveg-
arde simple pour les autres. slocate [-Vh] [--version] [--help]
never, simple
Faire toujours une sauvegarde simple. DESCRIPTION
Secure Locate provides a secure way to index and
OPTIONS STANDARDS GNU quickly search for files on your system. It uses incremen-
--help Afficher un message d'aide sur la sortie standard, tal encoding just like GNU locate to compress its database
et terminer correctement. to make searching faster, but it will also store file per-
missions and ownership so that users will not see files
--version they do not have access to.
Afficher un numéro de version sur la sortie stan-
dard, et terminer correctement. This manual page documents the GNU version of slocate.
slocate Enables system users to search entire filesystems
-- Fin de la liste d'options. without displaying unauthorized files.
ENVIRONNEMENT OPTIONS
Les variables LANG, LC_ALL, LC_CTYPE et LC_MESSAGES ont -u Create slocate database starting at path /.
leurs significations habituelles.
-U <dir>
CONFORMITÉ Create slocate database starting at path <dir>.
POSIX 1003.2. Toutefois, POSIX 1003.2 (1996) ne parle pas
des liens symboliques. Ceux-ci ont été introduits par -e <dir1,dir2,...>
BSD, et n'existent pas dans System V release 3 et Exclude directories from the slocate database.
antérieurs.
-f <fstype1,...>
VOIR AUSSI Exclude files on specific file systems from the
ls(1), rm(1), link(2), lstat(2), open(2), readlink(2), slocate database.
stat(2), unlink(2)
-c Parse '/etc/updatedb.conf' when updating the slo-
NOTES cate database.
Cette page décrit la version de ln se trouvant dans le
package fileutils-3.16. D'autres versions peuvent -l <level>
diffèrer légèrement. Envoyez les corrections concernant Security level. 0 turns security checks off. This
cette page de manuel (en anglais) à aeb@cwi.nl, will make searchs faster. 1 turns security checks
aw@mail1.bet1.puv.fi, et ragnar@lightside.ddns.org, et (en on. This is the default.
francais) à ccb@club-internet.fr. Signalez les bugs dans
le programme à fileutils-bugs@gnu.ai.mit.edu. -i Does a case insensitive search.
-r <regexp>
GNU 24 Novembre 1998 LN(1) --regexp=<regexp> Search the database using a basic
POSIX regular expression.
-o <file>
( % ( % --output=<file> Specifies the database to create.
-d <path>
--database=<path> Specifies the path of databases
to search in.
NAME
slocate - Security Enhanced version of the GNU Locate -h --help Display this help.
SYNOPSIS -v --verbose Verbose mode. Display files when creating
slocate [-qi] [-d <path>] [--database=<path>] <search database.
string>
-V --version Display version.
slocate [-i] [-r <regexp>] [--regexp=<regexp>]
- &
AUTHOR
Kevin Lindsay - Copyright (c) 1999, 2000 Avec vdir, les fichiers sont par défaut présentés suivant
un format long.
BUG REPORT
Report any bugs to klindsay@mkintraweb.com OPTIONS POSIX
-1 Présenter un fichier par ligne.
0 *
OPTIONS GNU
-1, --format=single-column Les autorisations d'accès listées sont similaires
Présenter un fichier par ligne. aux spécifications de modes, mais ls regroupe
plusieurs bits dans le troisième caractère de
-a, --all chaque jeu de permissions.
Afficher tous les fichiers des répertoires, y com-
pris les fichiers commençant par un `.'. s si le bit setuid ou setgid et le bit
d'exécution correspondant sont tous deux
-b, --escape valides.
Présenter les caractères non-affichables des noms
de fichiers en utilisant des séquences S si le bit setuid ou setgid est actif mais le
alphabétiques ou octales commençant par un back- bit d'exécution correspondant n'est pas con-
slash `\' comme en C. figuré.
Reading mail
TRADUCTION In normal usage mail is given no arguments and checks your mail out of
Christophe Blaess, 1997. the post office, then prints out a one line header of each message found.
The current message is initially the first message (numbered 1) and can
be printed using the print command (which can be abbreviated `p'). You
can move among the messages much as you move between lines in ed(1), with
FSF 02 Janvier 2000 LS(1L) the commands `+' and `-' moving backwards and forwards, and simple num-
bers.
Disposing of mail.
'
After examining a message you can delete `d') the message or reply `r') search proceeds backwards, and if there are no good messages at all, mail
to it. Deletion causes the mail program to forget about the message. types ``applicable messages'' and aborts the command.
This is not irreversible; the message can be undeleted `u') by giving its
number, or the mail session can be aborted by giving the exit `x') com- - Print out the preceding message. If given a numeric argument n,
mand. Deleted messages will, however, usually disappear never to be seen goes to the n'th previous message and prints it.
again.
? Prints a brief summary of commands.
Specifying messages
Commands such as print and delete can be given a list of message numbers ! Executes the shell (see sh(1) and csh(1)) command which follows.
as arguments to apply to a number of messages at once. Thus ``delete 1
2'' deletes messages 1 and 2, while ``delete 1-5'' deletes messages 1 Print (P) Like print but also prints out ignored header fields. See
through 5. The special name `*' addresses all messages, and `$' also print, ignore and retain.
addresses the last message; thus the command top which prints the first
few lines of a message could be used in ``top *'' to print the first few Reply (R) Reply to originator. Does not reply to other recipients of
lines of all messages. the original message.
Personal and systemwide distribution lists. copy (co) The copy command does the same thing that save does, except
It is also possible to create a personal distribution lists so that, for that it does not mark the messages it is used on for deletion
instance, you can send mail to ``cohorts'' and have it go to a group of when you quit.
people. Such lists can be defined by placing a line like
delete (d) Takes a list of messages as argument and marks them all as
alias cohorts bill ozalp jkf mark kridle@ucbcory deleted. Deleted messages will not be saved in mbox, nor will
they be available for most other commands.
in the file .mailrc in your home directory. The current list of such
aliases can be displayed with the alias command in mail. System wide dp (also dt) Deletes the current message and prints the next mes-
distribution lists can be created by editing /etc/aliases, see aliases(5) sage. If there is no next message, mail says ``at EOF''.
and sendmail(8); these are kept in a different syntax. In mail you send,
personal aliases will be expanded in mail sent to others so that they edit (e) Takes a list of messages and points the text editor at each
will be able to reply to the recipients. System wide aliases are not one in turn. On return from the editor, the message is read back
expanded when the mail is sent, but any reply returned to the machine in.
will have the system wide alias expanded as all mail goes through
sendmail. exit (ex or x) Effects an immediate return to the Shell without modi-
fying the user's system mailbox, his mbox file, or his edit file
Network mail (ARPA, UUCP, Berknet) in -f.
See mailaddr(7) for a description of network addresses.
file (fi) The same as folder.
Mail has a number of options which can be set in the .mailrc file to
alter its behavior; thus ``set askcc'' enables the askcc feature. (These folders
options are summarized below.) List the names of the folders in your folder directory.
SUMMARY folder (fo) The folder command switches to a new mail file or folder.
(Adapted from the `Mail Reference Manual') With no arguments, it tells you which file you are currently
reading. If you give it an argument, it will write out changes
Each command is typed on a line by itself, and may take arguments follow- (such as deletions) you have made in the current file and read in
ing the command word. The command need not be typed in its entirety - the new file. Some special conventions are recognized for the
the first command which matches the typed prefix is used. For commands name. # means the previous file, % means your system mailbox,
which take message lists as arguments, if no message list is given, then %user means user's system mailbox, & means your mbox file, and
the next message forward which satisfies the command's requirements is +folder means a file in your folder directory.
used. If there are no messages forward of the current message, the
- &
from (f) Takes a list of messages and prints their message headers.
set (se) With no arguments, prints all variable values. Otherwise,
headers sets option. Arguments are of the form option=value (no space
(h) Lists the current range of headers, which is an 18-message before or after =) or option. Quotation marks may be placed
group. If a `+' argument is given, then the next 18-message around any part of the assignment statement to quote blanks or
group is printed, and if a `-' argument is given, the previous tabs, i.e. ``set indentprefix="->"''
18-message group is printed.
saveignore
help A synonym for ? Saveignore is to save what ignore is to print and type. Header
fields thus marked are filtered out when saving a message by save
hold (ho, also preserve) Takes a message list and marks each message or when automatically saving to mbox.
therein to be saved in the user's system mailbox instead of in
mbox. Does not override the delete command. saveretain
Saveretain is to save what retain is to print and type. Header
ignore Add the list of header fields named to the ignored list. Header fields thus marked are the only ones saved with a message when
fields in the ignore list are not printed on your terminal when saving by save or when automatically saving to mbox. Saveretain
you print a message. This command is very handy for suppression overrides saveignore.
of certain machine-generated header fields. The Type and Print
commands can be used to print a message in its entirety, includ- shell (sh) Invokes an interactive version of the shell.
ing ignored fields. If ignore is executed with no arguments, it
lists the current set of ignored fields. size Takes a message list and prints out the size in characters of
each message.
mail (m) Takes as argument login names and distribution group names
and sends mail to those people. source The source command reads commands from a file.
mbox Indicate that a list of messages be sent to mbox in your home top Takes a message list and prints the top few lines of each. The
directory when you quit. This is the default action for messages number of lines printed is controlled by the variable toplines
if you do not have the hold option set. and defaults to five.
next (n) like + or CR) Goes to the next message in sequence and types type (t) A synonym for print.
it. With an argument list, types the next matching message.
unalias
preserve Takes a list of names defined by alias commands and discards the
(pre) A synonym for hold. remembered groups of users. The group names no longer have any
significance.
print (p) Takes a message list and types out each message on the user's
terminal. undelete
(u) Takes a message list and marks each message as not being
quit (q) Terminates the session, saving all undeleted, unsaved mes- deleted.
sages in the user's mbox file in his login directory, preserving
all messages marked with hold or preserve or never referenced in unread (U) Takes a message list and marks each message as not having
his system mailbox, and removing all other messages from his sys- been read.
tem mailbox. If new mail has arrived during the session, the
message ``You have new mail'' is given. If given while editing a unset Takes a list of option names and discards their remembered val-
mailbox file with the -f flag, then the edit file is rewritten. ues; the inverse of set.
A return to the Shell is effected, unless the rewrite of edit
file fails, in which case the user can escape with the exit com- visual (v) Takes a message list and invokes the display editor on each
mand. message.
reply (r) Takes a message list and sends mail to the sender and all write (w) Similar to save, except that only the message body (without)
recipients of the specified message. The default message must the header) is saved. Extremely useful for such tasks as sending
not be deleted. and receiving source program text over the message system.
~d Read the file ``dead.letter'' from your home directory into the Mail Options
message. Options are controlled via set and unset commands. Options may be either
binary, in which case it is only significant to see whether they are set
~e Invoke the text editor on the message collected so far. After or not; or string, in which case the actual value is of interest. The
the editing session is finished, you may continue appending text binary options include the following:
to the message.
append Causes messages saved in mbox to be appended to the end rather
~fmessages than prepended. This should always be set (perhaps in
Read the named messages into the message being sent. If no mes- /etc/mail.rc).
sages are specified, read in the current message. Message head-
ers currently being ignored (by the ignore or retain command) are ask, asksub
not included. Causes mail to prompt you for the subject of each message you
send. If you respond with simply a newline, no subject field
~Fmessages will be sent.
Identical to ~f, except all message headers are included.
askcc Causes you to be prompted for additional carbon copy recipients
~h Edit the message header fields by typing each one in turn and at the end of each message. Responding with a newline indicates
allowing the user to append text to the end or modify the field your satisfaction with the current list.
by using the current terminal erase and kill characters.
askbcc Causes you to be prompted for additional blind carbon copy recip-
~mmessages ients at the end of each message. Responding with a newline
Read the named messages into the message being sent, indented by indicates your satisfaction with the current list.
a tab or by the value of indentprefix. If no messages are speci-
fied, read the current message. Message headers currently being autoprint
ignored (by the ignore or retain command) are not included. Causes the delete command to behave like dp - thus, after delet-
ing a message, the next one will be typed automatically.
~Mmessages
Identical to ~m, except all message headers are included. debug Setting the binary option debug is the same as specifying -d on
the command line and causes mail to output all sorts of informa-
~p Print out the message collected so far, prefaced by the message tion useful for debugging mail.
header fields.
dot The binary option dot causes mail to interpret a period alone on
~q Abort the message being sent, copying the message to a line as the terminator of a message you are sending.
``dead.letter'' in your home directory if save is set.
hold This option is used to hold messages in the system mailbox by
~rfilename default.
Read the named file into the message.
ignore Causes interrupt signals from your terminal to be ignored and
~sstring echoed as @'s.
Cause the named string to become the current subject field.
ignoreeof
~tname ... An option related to dot is ignoreeof which makes mail refuse to
Add the given names to the direct recipient list. accept a control-d as the end of a message. Ignoreeof also
applies to mail command mode.
~v Invoke an alternate editor (defined by the VISUAL option) on the
message collected so far. Usually, the alternate editor will be metoo Usually, when a group is expanded that contains the sender, the
a screen editor. After you quit the editor, you may resume sender is removed from the expansion. Setting this option causes
appending text to the end of your message. the sender to be included in the group.
~wfilename noheader
Write the message onto the named file. Setting the option noheader is the same as giving the -N flag on
the command line.
~|command
Pipe the message through the command as a filter. If the command nosave Normally, when you abort a message with two RUBOUT (erase or
gives no output or terminates abnormally, retain the original delete) mail copies the partial letter to the file
text of the message. The command fmt(1) is often used as command ``dead.letter'' in your home directory. Setting the binary
option nosave prevents this. Mail utilizes the HOME, USER, SHELL, DEAD, PAGER, LISTER, EDITOR, VISUAL
and MBOX environment variables.
Replyall
Reverses the sense of reply and Reply commands. FILES
/var/spool/mail/* Post office.
quiet Suppresses the printing of the version when first invoked. ~/mbox User's old mail.
~/.mailrc File giving initial mail commands. Only used if the
searchheaders owner of the file is the user running this copy of
If this option is set, then a message-list specifier in the form mail.
``/x:y'' will expand to all messages containing the substring /tmp/R* Temporary files.
``y'' in the header field ``x''. The string search is case /usr/lib/mail.*help Help files.
insensitive. /etc/mail.rc System initialization file.
LISTER Pathname of the directory lister to use in the folders com- BUGS
mand. Default is /bin/ls. There are some flags that are not documented here. Most are not useful
to the general user.
PAGER Pathname of the program to use in the more command or when
crt variable is set. The default paginator more(1) is used 4th Berkeley Distribution December 30, 1993 4th Berkeley Distribution
if this option is not defined.
folder The name of the directory to use for storing folders of DESCRIPTION
messages. If this name begins with a `/', mail considers man formats and displays the on-line manual pages. If you
it to be an absolute pathname; otherwise, the folder direc- specify section, man only looks in that section of the
tory is found relative to your home directory. manual. name is normally the name of the manual page,
which is typically the name of a command, function, or
MBOX The name of the mbox file. It can be the name of a folder. file. However, if name contains a slash (/) then man
The default is ``mbox'' in the user's home directory. interprets it as a file specification, so that you can do
man ./foo.5 or even man /cd/foo/bar.1.gz.
record If defined, gives the pathname of the file used to record
all outgoing mail. If not defined, then outgoing mail is See below for a description of where man looks for the
not so saved. manual page files.
indentprefix String used by the ``~m'' tilde escape for indenting mes-
sages, in place of the normal tab character (^I). Be sure OPTIONS
to quote the value if it contains spaces or tabs. -C config_file
Specify the configuration file to use; the default
toplines If defined, gives the number of lines of a message to be is /usr//etc/man.config. (See man.conf(5).)
printed out with the top command; normally, the first five
lines are printed. -M path
Specify the list of directories to search for man
ENVIRONMENT pages. Separate the directories with colons. An
!
empty list is the same as not specifying -M at all. ted or displayed. If no argument is given: display
See SEARCH PATH FOR MANUAL PAGES. (on stdout) the list of directories that is
searched by man for man pages. If manpath is a link
-P pager to man, then "manpath" is equivalent to "man
Specify which pager to use. This option overrides --path".
the MANPAGER environment variable, which in turn
overrides the PAGER variable. By default, man uses -W Like -w, but print file names one per line, without
/usr/bin/less -isr. additional information. This is useful in shell
commands like man -aW man | xargs ls -l
-S section_list
List is a colon separated list of manual sections
to search. This option overrides the MANSECT envi- CAT PAGES
ronment variable. Man will try to save the formatted man pages, in order to
save formatting time the next time these pages are needed.
-a By default, man will exit after displaying the Traditionally, formatted versions of pages in DIR/manX are
first manual page it finds. Using this option saved in DIR/catX, but other mappings from man dir to cat
forces man to display all the manual pages that dir can be specified in /usr//etc/man.config. No cat
match name, not just the first. pages are saved when the required cat directory does not
exist. No cat pages are saved when they are formatted for
-c Reformat the source man page, even when an up-to- a line length different from 80. No cat pages are saved
date cat page exists. This can be meaningful if when man.conf contains the line NOCACHE.
the cat page was formatted for a screen with a dif-
ferent number of columns, or if the preformatted It is possible to make man suid to a user man. Then, if a
page is corrupted. cat directory has owner man and mode 0755 (only writable
by man), and the cat files have owner man and mode 0644 or
-d Don't actually display the man pages, but do print 0444 (only writable by man, or not writable at all), no
gobs of debugging information. ordinary user can change the cat pages or put other files
in the cat directory. If man is not made suid, then a cat
-D Both display and print debugging info. directory should have mode 0777 if all users should be
able to leave cat pages there.
-f Equivalent to whatis.
The option -c forces reformatting a page, even if a recent
-F or --preformat cat page exists.
Format only - do not display.
In addition, for each directory in the command search path NLSPATH, LC_MESSAGES, LANG
(we'll call it a "command directory") for which you do not The environment variables NLSPATH and LC_MESSAGES
have a MANPATH_MAP statement, man automatically looks for (or LANG when the latter does not exist) play a
a manual page directory "nearby" namely as a subdirectory role in locating the message catalog. (But the
in the command directory itself or in the parent directory English messages are compiled in, and for English
of the command directory. no catalog is required.) Note that programs like
col(1) called by man also use e.g. LC_CTYPE.
You can disable the automatic "nearby" searches by includ-
ing a NOAUTOPATH statement in /usr//etc/man.config. PATH PATH helps determine the search path for manual
page files. See SEARCH PATH FOR MANUAL PAGES.
In each directory in the search path as described above,
man searches for a file named topic.section, with an SYSTEM SYSTEM is used to get the default alternate system
optional suffix on the section number and possibly a com- name (for use with the -m option).
pression suffix. If it doesn't find such a file, it then
looks in any subdirectories named manN or catN where N is SEE ALSO
the manual section number. If the file is in a catN sub- apropos(1), whatis(1), less(1), groff(1), man.config(5).
directory, man assumes it is a formatted manual page file
(cat page). Otherwise, man assumes it is unformatted. In BUGS
either case, if the filename has a known compression suf- The -t option only works if a troff-like program is
fix (like .gz), man assumes it is gzipped. installed.
If you see blinking \255 or <AD> instead of hyphens, put
If you want to see where (or if) man would find the manual `LESSCHARSET=latin1' in your environment.
page for a particular topic, use the --path (-w) option.
TIPS
If you add the line
ENVIRONMENT
MANPATH (global-set-key [(f1)] (lambda () (interactive) (manual-
If MANPATH is set, man uses it as the path to entry (current-word))))
search for manual page files. It overrides the
configuration file and the automatic search path, to your .emacs file, then hitting F1 will give you the man
but is overridden by the -M invocation option. See page for the library call at the current cursor position.
SEARCH PATH FOR MANUAL PAGES.
To get a plain text version of a man page, without
MANPL If MANPL is set, its value is used as the display backspaces and underscores, try
page length. Otherwise, the entire man page will
occupy one (long) page. # man foo | col -b > foo.mantxt
MANROFFSEQ
If MANROFFSEQ is set, its value is used to deter-
mine the set of preprocessors run before running
nroff or troff. By default, pages are passed September 2, 1995 man(1)
through the tbl preprocessor before nroff.
MANSECT
If MANSECT is set, its value is used to determine &- &-
which manual sections to search.
MANWIDTH
If MANWIDTH is set, its value is used as the width
manpages should be displayed. Otherwise the pages NAME
may be displayed over the whole width of your mc - Visual shell for Unix-like systems.
screen.
USAGE
MANPAGER mc [-abcCdfhPstuUVx?] [-l log] [dir1 [dir2]] [-v file]
If MANPAGER is set, its value is used as the name
of the program to use to display the man page. If DESCRIPTION
not, then PAGER is used. If that has no value The Midnight Commander is a directory browser/file manager
either, /usr/bin/less -isr is used. for Unix-like operating systems.
- &
OPTIONS If specified, the first path name is the directory to show
-a Disables the usage of graphic characters for line in the selected panel; the second path name is the direc-
drawing. tory to be shown in the other panel.
-f Displays the compiled-in search paths for Midnight The Midnight Commander provides a view of two directories
Commander files. at the same time. One of the panels is the current panel
(a selection bar is in the current panel). Almost all
-k Reset softkeys to their default from the term- operations take place on the current panel. Some file
cap/terminfo database. Only useful on HP terminals operations like Rename and Copy by default use the direc-
when the function keys don't work. tory of the unselected panel as a destination (don't
worry, they always ask you for confirmation first). For
-l file more information, see the sections on the Directory Pan-
Save the ftpfs dialog with the server in file. els, the Left and Right Menus and the File Menu.
-P At program end, the Midnight Commander will print You can execute system commands from the Midnight Comman-
the last working directory. This function should der by simply typing them. Everything you type will appear
not be used directly, instead, it should be used on the shell command line, and when you press Enter the
from a special shell function that will automati- Midnight Commander will execute the command line you
cally change the current directory of the shell to typed; read the Shell Command Line and Input Line Keys
the last directory the Midnight Commander was in sections to learn more about the command line.
(thanks to Torben Fjerdingstad and Sergey for con-
tributing this function and the code implementing
this option). Source the files Mouse Support
/usr/lib/mc/bin/mc.sh (bash and zsh users) respec- The Midnight Commander comes with mouse support. It is
tively /usr/lib/mc/bin/mc.csh (tcsh users) in order activated whenever you are running on an xterm(1) terminal
to have this function defined. (it even works if you take a telnet or rlogin connection
to another machine from the xterm) or if you are running
-s Turns on the slow terminal mode, in this mode the on a Linux console and have the gpm mouse server running.
program will not draw expensive line drawing char-
acters and will toggle verbose mode off. When you left click on a file in the directory panels,
that file is selected; if you click with the right button,
-t Used only if the code was compiled with Slang and the file is marked (or unmarked, depending on the previous
terminfo: it makes the Midnight Commander use the state).
value of the TERMCAP variable for the terminal
information instead of the information on the sys- Double-clicking on a file will try to execute the command
tem wide terminal database if it is an executable program; and if the extension file
has a program specified for the file's extension, the
-u Disables the use of a concurrent shell (only makes specified program is executed.
sense if the Midnight Commander has been built with
concurrent shell support). Also, it is possible to execute the commands assigned to
the function key labels by clicking on them.
-U Enables the use of the concurrent shell support
(only makes sense if the Midnight Commander was If a mouse button is clicked on the top frame line of the
built with the subshell support set as an optional directory panel, it is scrolled one pageful backward. Cor-
feature). respondingly, a click on the bottom frame line will cause
a scroll of one pageful forward. This frame line method
-v file works also in the Help Viewer and the Directory Tree.
Enters the internal viewer to view the file speci-
fied. The default auto repeat rate for the mouse buttons is 400
milliseconds. This may be changed to other values by edit-
-V Displays the version of the program. ing the ~/.mc/ini file and changing the mouse_repeat_rate
parameter.
-x Forces xterm mode. Used when running on xterm-
capable terminals (two screen modes, and able to If you are running the Commander with the mouse support,
send mouse escape sequences). you can bypass the Commander and get the default mouse
behavior (cutting and pasting text) by holding down the
0 !*
Shift key.
C-x l. Run the link command.
C-<chr> means hold the Control key while typing the char- C-x !. Execute the External panelize command.
acter <chr>. Thus C-f would be: hold the Control key and
type f. C-x h Run the add directory to hotlist command.
M-<chr> means hold the Meta or Alt key down while typing M-!, Executes the Filtered view command, described in the
<chr>. If there is no Meta or Alt key, type ESC, release view command.
it, then type the character <chr>.
M-?, Executes the Find file command.
All input lines in the Midnight Commander use an approxi-
mation to the GNU Emacs editor's key bindings. M-c, Pops up the quick cd dialog.
There are many sections which tell about the keys. The C-o, When the program is being run in the Linux or SCO
following are the most important. console or under an xterm, it will show you the output of
the previous command. When ran on the Linux console, the
The File Menu section documents the keyboard shortcuts for Midnight Commander uses an external program (cons.saver)
the commands appearing in the File menu. This section to handle saving and restoring of information on the
includes the function keys. Most of these commands perform screen.
some action, usually on the selected file or the tagged
files. When the subshell support is compiled in, you can type C-o
at any time and you will be taken back to the Midnight
The Directory Panels section documents the keys which Commander main screen, to return to your application just
select a file or tag files as a target for a later action type C-o. If you have an application suspended by using
(the action is usually one from the file menu). this trick, you won't be able to execute other programs
from the Midnight Commander until you terminate the sus-
The Shell Command Line section list the keys which are pended application.
used for entering and editing command lines. Most of these
copy file names and such from the directory panels to the
command line (to avoid excessive typing) or access the Directory Panels
command line history. This section lists the keys which operate on the directory
panels. If you want to know how to change the appearance
Input Line Keys are used for editing input lines. This of the panels take a look at the section on Left and Right
means both the command line and the input lines in the Menus.
query dialogs.
Tab, C-i. Change the current panel. The old other panel
becomes the new current panel and the old current panel
Miscellaneous Keys becomes the new other panel. The selection bar moves from
Here are some keys which don't fall into any of the other the old current panel to the new current panel.
categories:
Insert, C-t. To tag files you may use the Insert key (the
Enter. If there is some text in the command line (the one kich1 terminfo sequence) or the C-t (Control-t) sequence.
at the bottom of the panels), then that command is To untag files, just retag a tagged file.
executed. If there is no text in the command line then if
the selection bar is over a directory the Midnight Comman- M-g, M-h (or M-r), M-j. Used to select the top file in a
der does a chdir(2) to the selected directory and reloads panel, the middle file and the bottom one, respectively.
the information on the panel; if the selection is an exe-
cutable file then it is executed. Finally, if the exten- C-s, M-s. Start a filename search in the directory list-
sion of the selected file name matches one of the exten- ing. When the search is active the keypresses will be
sions in the extensions file then the corresponding com- added to the search string instead of the command line. If
mand is executed. the Show mini-status option is enabled the search string
is shown on the mini-status line. When typing, the selec-
C-l. Repaint all the information in the Midnight Comman- tion bar will move to the next file starting with the
der. typed letters. The backspace or DEL keys can be used to
correct typing mistakes. If C-s is pressed again, the next
C-x c. Run the Chmod command on a file or on the tagged match is searched for.
files.
M-t Toggle the current display listing to show the next
C-x o. Run the Chown command on the current file or on display listing mode. With this it is possible to quickly
the tagged files. switch from long listing to regular listing and the user
! !
defined listing mode. hostname completion for you.
C-\ (control-backslash). Show the directory hotlist and C-x t, C-x C-t. Copy the tagged files (or if there are no
change to the selected directory. tagged files, the selected file) of the current panel (C-x
t) or of the other panel (C-x C-t) to the command line.
+ (plus). This is used to select (tag) a group of files.
The Midnight Commander will prompt for a regular expres- C-x p, C-x C-p. The first key sequence copies the current
sion describing the group. When Shell Patterns are path name to the command line, and the second one copies
enabled, the regular expression is much like the regular the unselected panel's path name to the command line.
expressions in the shell (* standing for zero or more
characters and ? standing for one character). If Shell C-q. The quote command can be used to insert characters
Patterns is off, then the tagging of files is done with that are otherwise interpreted by the Midnight Commander
normal regular expressions (see ed (1)). (like the '+' symbol)
If the expression starts or ends with a slash (/), then it M-p, M-n. Use these keys to browse through the command
will select directories instead of files. history. M-p takes you to the last entry, M-n takes you to
the next one.
\ (backslash). Use the "\" key to unselect a group of
files. This is the opposite of the Plus key. M-h. Displays the history for the current input line.
C-PageUp, C-PageDown Only when ran on the Linux console: The help viewer and the file viewer accept the following
does a chdir to ".." and to the currently selected direc- keys in addition the to ones mentioned above:
tory respectively.
b, C-b, C-h, Backspace, Delete. Moves one pageful
M-y Moves to the previous directory in the history, backward.
equivalent to depressing the '<' with the mouse.
Space bar. Moves one pageful forward.
M-u Moves to the next directory in the history, equivalent
to depressing the '>' with the mouse. Displays the direc- u, d. Moves one half of a page backward or forward.
tory history, equivalent to depressing the 'v' with the
mouse. g, G. Moves to the beginning or to the end.
M-Enter. Copy the currently selected file name to the C-a puts the cursor at the beginning of line.
command line.
C-e puts the cursor at the end of the line.
C-Enter. Same a M-Enter, this one only works on the Linux
console. C-b, move-left move the cursor one position left.
M-Tab. Does the filename, command, variable, username and C-f, move-right move the cursor one position right.
! !!
command. The long view takes the whole screen width.
M-f moves one word forward.
If you choose the "User" display format, then you have to
M-b moves one word backward. specify the display format.
C-h, backspace delete the previous character. The user display format must start with a panel size spec-
ifier. This may be "half" or "full", and they specify a
C-d, Delete delete the character in the point (over the half screen panel and a full screen panel respectively.
cursor).
After the panel size, you may specify the two columns mode
C-@ sets the mark for cutting. on the panel, this is done by adding the number "2" to the
user format string.
C-w copies the text between the cursor and the mark to a
kill buffer and removes the text from the input line. After this you add the name of the fields with an optional
size specifier. This are the available fields you may
M-w copies the text between the cursor and the mark to a display:
kill buffer.
name, displays the file name.
C-y yanks back the contents of the kill buffer.
size, displays the file size.
C-k kills the text from the cursor to the end of the line.
bsize, is an alternative form of the size format. It dis-
M-p, M-n Use these keys to browse through the command his- plays the size of the files and for directories it just
tory. M-p takes you to the last entry, M-n takes you to shows SUB-DIR or UP--DIR.
the next one.
type, displays a one character field type. This character
M-C-h, M-Backspace delete one word backward. is a superset of what is displayed by ls with the -F flag.
An asterisk for executable files, a slash for directories,
M-Tab does the filename, command, variable, username and an at-sign for links, an equal sign for sockets, a hyphen
hostname completion for you. for character devices, a plus sign for block devices, a
pipe for fifos, a tilde for symbolic links to directories
and an exclamation mark for stalled symlinks (links that
point nowhere).
Menu Bar
The menu bar pops up when you press F9 or click the mouse mtime, file's last modification time.
on the top row of the screen. The menu bar has five menus:
"Left", "File", "Command", "Options" and "Right". atime, file's last access time.
The Left and Right Menus allow you to modify the appear- ctime, file's creation time.
ance of the left and right directory panels.
perm, a string representing the current permission bits of
The File Menu lists the actions you can perform on the the file.
currently selected file or the tagged files.
mode, an octal value with the current permission bits of
The Command Menu lists the actions which are more general the file.
and bear no relation to the currently selected file or the
tagged files. nlink, the number of links to the file.
The Options Menu lists the actions which allow you to cus- ngid, the GID (numeric).
tomize the Midnight Commander.
nuid, the UID (numeric).
And the Long display corresponds to this format: The File menu has the following commands (keyboard short-
cuts in parentheses):
full
perm,space,nlink,space,owner,space,group,space,size,space, Help (F1)
mtime,space,name
Invokes the built-in hypertext help viewer. Inside the
This is a nice user display format: help viewer, you can use the Tab key to select the next
link and the Enter key to follow that link. The keys Space
half name,|,size:7,|,type,mode:3 and Backspace are used to move forward and backward in a
help page. Press F1 again to get the full list of accepted
Panels may also be set to the following modes: keys.
Info The info view display information related to the Menu (F2)
currently selected file and if possible information
about the current file system. Invoke the user menu. The user menu provides an easy way
to provide users with a menu and add extra features to the
Tree The tree view is quite similar to the directory Midnight Commander.
tree feature. See the section about it for more
information. View (F3, Shift-F3)
Quick View View the currently selected file. By default this invokes
In this mode, the panel will switch to a reduced the Internal File Viewer but if the option "Use internal
viewer that displays the contents of the currently view" is off, it invokes an external file viewer specified
selected file, if you select the panel (with the by the PAGER environment variable. If PAGER is undefined,
tab key or the mouse), you will have access to the the "view" command is invoked. If you use Shift-F3
usual viewer commands. instead, the viewer will be invoked without doing any for-
matting or preprocessing to the file.
Delete the currently selected file or the tagged files in The Command history command shows a list of typed com-
the currently selected panel. During the process, you can mands. The selected command is copied to the command line.
press C-c or ESC to abort the operation. The command history can also be accessed by typing M-p or
M-n.
Quick cd (M-c) Use the quick cd command if you have full
command line and want to cd somewhere. The Directory hotlist (C-\) command makes changing of the
current directory to often used directories faster.
Select group (+)
The External panelize allows you to execute an external
!0 *
program, and make the output of that program the contents string. If there is no such directory these keys will move
of the current panel. one line down.
Extension file edit command allows you to specify programs C-h, Backspace. Delete the last character of the search
to executed when you try to execute, view, edit and do a string.
bunch of other thing on files with certain extensions
(filename endings). The Menu file edit command may be used Any other character. Add the character to the search
for editing the user menu (which appears by pressing F2). string and move to the next directory which starts with
these characters. In the tree view you must first activate
the search mode by pressing C-s. The search string is
Directory Tree shown in the mini status line.
The Directory Tree command shows a tree figure of the
directories. You can select a directory from the figure The following actions are available only in the directory
and the Midnight Commander will change to that directory. tree. They aren't supported in the tree view.
There are two ways to invoke the tree. The real directory F1 (Help). Invoke the help viewer and show this section.
tree command is available from Commands menu. The other
way is to select tree view from the Left or Right menu. Esc, F10. Exit the directory tree. Do not change the
directory.
To get rid of long delays the Midnight Commander creates
the tree figure by scanning only a small subset of all the The mouse is supported. A double-click behaves like Enter.
directories. If the directory which you want to see is See also the section on mouse support.
missing, move to its parent directory and press C-r (or
F2).
Find File
You can use the following keys: The Find File feature first asks for the start directory
for the search and the filename to be searched for. By
General movement keys are accepted. pressing the Tree button you can select the start direc-
tory from the directory tree figure.
Enter. In the directory tree, exits the directory tree
and changes to this directory in the current panel. In the The contents field accepts regular expressions similar to
tree view, changes to this directory in the other panel egrep(1). That means you have to escape characters with a
and stays in tree view mode in the current panel. special meaning to egrep with "\", e.g. if you search for
"strcmp (" you will have to input "strcmp \(" (without the
C-r, F2 (Rescan). Rescan this directory. Use this when double quotes).
the tree figure is out of date: it is missing subdirecto-
ries or shows some subdirectories which don't exist any You can start the search by pressing the Ok button. Dur-
more. ing the search you can stop from the Stop button and con-
tinue from the Start button.
F3 (Forget). Delete this directory from the tree figure.
Use this to remove clutter from the figure. If you want You can browse the filelist with the up and down arrow
the directory back to the tree figure press F2 in its par- keys. The Chdir button will change to the directory of the
ent directory. currently selected file. The Again button will ask for the
parameters for a new search. The Quit button quits the
F4 (Static/Dynamic). Toggle between the dynamic naviga- search operation. The Panelize button will place the found
tion mode (default) and the static navigation mode. files to the current directory panel so that you can do
additional operations on them (view, copy, move, delete
In the static navigation mode you can use the Up and Down and so on). After panelizing you can press C-r to return
keys to select a directory. All known directories are to the normal file listing.
shown.
It is possible to have a list of directories that the Find
In the dynamic navigation mode you can use the Up and Down File command should skip during the search (for example,
keys to select a sibling directory, the Left key to move you may want to avoid searches on a CDROM or on a NFS
to the parent directory, and the Right key to move to a directory that is mounted across a slow link).
child directory. Only the parent, sibling and children
directories are shown, others are left out. The tree fig- Directories to be skipped should be set on the variable
ure changes dynamically as you traverse. find_ignore_dirs in the Misc section of your ~/.mc/ini
file.
F5 (Copy). Copy the directory.
Directory components should be separated with a colon,
F6 (RenMov). Move the directory. here is an example:
J Copy current directory to other panel recursively The conditions are calculated from left to right. This
tar cf - . | (cd %D && tar xvpf -) means
= f *.tar.gz | f *.tgz & t n
K Make a release of the current subdirectory is calculated as
echo -n "Name of distribution file: " ( (f *.tar.gz) | (f *.tgz) ) & (t n)
read tar
ln -s %d `dirname %d`/$tar Here is a sample of the use of conditions:
cd ..
tar cvhf ${tar}.tar $tar = f *.tar.gz | f *.tgz & t n
L List the contents of a compressed tar-archive
= f *.tar.gz | f *.tgz & t n gzip -cd %f | tar xvf -
X Extract the contents of a compressed tar file
tar xzvf %f Addition Conditions
Default Conditions If the condition begins with '+' (or '+?') instead of '='
(or '=?') it is an addition condition. If the condition is
Each menu entry may be preceded by a condition. The condi- true the menu entry will be included in the menu. If the
tion must start from the first column with a '=' charac- condition is false the menu entry will not be included in
ter. If the condition is true, the menu entry will be the the menu.
default entry.
You can combine default and addition conditions by start-
Condition syntax: = <sub-cond> ing condition with '+=' or '=+' (or '+=?' or '=+?' if you
or: = <sub-cond> | <sub-cond> ... want debug trace). If you want to use two different condi-
or: = <sub-cond> & <sub-cond> ... tions, one for adding and another for defaulting, you can
precede a menu entry with two condition lines, one start-
Sub-condition is one of following: ing with '+' and another starting with '='.
y <pattern> syntax of current file matching pattern? Comments are started with '#'. The additional comment
for edit menu only. lines must start with '#', space or tab.
f <pattern> current file matching pattern?
F <pattern> other file matching pattern?
d <pattern> current directory matching pattern? Options Menu
D <pattern> other directory matching pattern? The Midnight Commander has some options that may be tog-
t <type> current file of type? gled on and off in several dialogs which are accessible
T <type> other file of type? from this menu. Options are enabled if they have an aster-
x <filename> is it executable filename? isk or "x" in front of them.
! <sub-cond> negate the result of sub-condition
The Configuration command pops up a dialog from which you
Pattern is a normal shell pattern or a regular expression, can change most of settings of the Midnight Commander.
according to the shell patterns option. You can override
the global value of the shell patterns option by writing The Display bits command pops up a dialog from which you
"shell_patterns=x" on the first line of the menu file may select which characters is your terminal able to dis-
(where "x" is either 0 or 1). play.
'
of your command. If you are using the Linux or SCO
The Confirmation command pops up a dialog from which you console or an xterm, you will be able to see the
specify which actions you want to confirm. output of the command by typing C-o.
The Learn keys command pops up a dialog from which you On dumb terminals You will get the pause message on
test some keys which are not working on some terminals and terminals that are not capable of showing the out-
you may fix them. put of the last command executed (any terminal that
is not an xterm or the Linux console).
The Virtual FS command pops up a dialog from which you
specify some VFS related options. Always The program will pause after executing all
of your commands.
The Layout command pops up a dialog from which you specify
a bunch of options how mc looks like on the screen. Other Options
The Save setup command saves the current settings of the Verbose operation. This toggles whether the file Copy,
Left, Right and Options menus. A small number of other Rename and Delete operations are verbose (i.e., display a
settings is saved, too. dialog box for each operation). If you have a slow termi-
nal, you may wish to disable the verbose operation. It is
automatically turned off if the speed of your terminal is
Configuration less than 9600 bps.
The options in this dialog are divided into three groups:
Panel Options, Pause after run and Other Options. Compute totals. If this option is enabled, the Midnight
Commander computes total byte sizes and total number of
Panel Options files prior to any Copy, Rename and Delete operations.
This will provide you with a more accurate progress bar at
Show Backup Files. By default the Midnight Commander the expense of some speed. This option has no effect, if
doesn't show files ending in '~' (like GNU's ls option Verbose operation is disabled.
-B).
Shell Patterns. By default the Select, Unselect and Fil-
Show Hidden Files. By default the Midnight Commander will ter commands will use shell-like regular expressions. The
show all files that start with a dot (like ls -a). following conversions are performed to achieve this: the
'*' is replaced by '.*' (zero or more characters); the '?'
Mark moves down. By default when you mark a file (with is replaced by '.' (exactly one character) and '.' by the
either C-t or the Insert key) the selection bar will move literal dot. If the option is disabled, then the regular
down. expressions are the ones described in ed(1).
Drop down menus. When this option is enabled, when you Auto Save Setup. If this option is enabled, when you exit
press the F9 key, the pull down menus will be activated, the Midnight Commander the configurable options of the
else, you will only be presented with the menu title, and Midnight Commander are saved in the ~/.mc/ini file.
you will have to select the entry with the arrow keys or
the first letter and from there select your option in the Auto menus. If this option is enabled, the user menu will
menu. be invoked at startup. Useful for building menus for non-
unixers.
Mix all files. When this option is enabled, all files and
directories are shown mixed together. If the option is Use internal editor. If this option is enabled, the
off, directories (and links to directories) are shown at built-in file editor is used to edit files. If the option
the beginning of the listing, and other files afterwards. is disabled, the editor specified in the EDITOR environ-
ment variable is used. If no editor is specified, vi is
Fast directory reload. This option is off by default. If used. See the section on the internal file editor.
you activate the fast reload, the Midnight Commander will
use a trick to determine if the directory contents have Use internal viewer. If this option is enabled, the
changed. The trick is to reload the directory only if the built-in file viewer is used to view files. If the option
i-node of the directory has changed; this means that is disabled, the pager specified in the PAGER environment
reloads only happen when files are created or deleted. If variable is used. If no pager is specified, the view com-
what changes is the i-node for a file in the directory mand is used. See the section on the internal file
(file size changes, mode or owner changes, etc) the dis- viewer.
play is not updated. In these cases, if you have the
option on, you have to rescan the directory manually (with Complete: show all. By default the Midnight Commander
C-r). pops up all possible completions if the completion is
ambiguous if you press M-Tab for the second time, for the
Pause after run first time it just completes as much as possible and in
the case of ambiguity beeps. If you want to see all the
After executing your commands, the Midnight Commander can possible completions already after the first M-Tab press-
pause, so that you can examine the output of the command. ing, enable this option.
There are three possible settings for this variable:
Rotating dash. If this option is enabled, the Midnight
Never Means that you do not want to see the output Commander shows a rotating dash in the upper right corner
- &
as a work in progress indicator. type that key. If you want to abort this, press just Esc
and wait until the message disappears. Otherwise type the
Lynx-like motion. If this option is enabled, you may use key you're asked to type and also wait until the dialog
the arrows keys to automatically chdir if the current disappears.
selection is a subdirectory and the shell command line is
empty. By default, this setting is off. When you finish with all the keys, you may want either to
Save your key fixes into your ~/.mc/ini file into the
Advanced chown. If this option is enabled, the Advanced [terminal:TERM] section (where TERM is the name of your
Chown command will be invoked if you run the Chmod current terminal) or to discard them. If all your keys
or Chown command. were working properly and you had not to fix any key, then
(of course) no saving will occur.
Cd follows links. This option, if set, causes the Mid-
night Commander to follow the logical chain of directories
when changing current directory either in the panels, or Virtual FS
using the cd command. This is the default behavior of This option gives you control over the settings of the
bash. When unset, the Midnight Commander follows the real Virtual File System information cache.
directory structure, so cd .. if you've entered that
directory through a link will move you to the current The Midnight Commander keeps in memory the information
directory's real parent and not to the directory where the related to some of the virtual file systems to speed up
link was present. the access to the files in the file system (for example,
directory listings fetched from ftp servers).
Safe delete. If this option is enabled, deleting files
unintentionally will get more difficult. The default Moreover in order to access the contents of compressed
selection in the confirmation dialog changes from the files (for example, compressed tar files) the Midnight
"Yes" to the "No" button and deletion of non empty direc- Commander has to create a temporary uncompressed file on
tories has to be confirmed by entering the word yes . By your disk.
default this option is disabled.
Since both the information in memory and the temporary
files on disk take up resources, you may want to tune the
Display bits parameters of the cached information to decrease your
This is used to configure the range of visible characters resource usage or to maximize the speed of access to
on the screen. This setting may be 7-bits if your frequently used file systems.
terminal/curses supports only seven output bits,
ISO-8859-1 displays all the characters in the ISO-8859-1 The Tar file system is quite clever about how it handles
map and full 8 bits is for those terminals that can dis- tar files: it just loads the directory entries and when it
play full 8 bit characters. needs to use the information contained in the tar file, it
goes and grab it.
Confirmation In the wild, tar files are usually kept compressed (plain
In this menu you configure the confirmation options for tar files are species in extinction), and because of the
file deletion, overwriting, execution by pressing enter nature of those files (the directory entries for the tar
and quitting the program. files is not there waiting for us to be loaded), the tar
file system has to uncompress the file on the disk in a
temporary location and then access the uncompressed file
Learn keys as a regular tar file.
This dialog lets you test if your keys F1-F20, Home, End,
etc. work properly on your terminal. They often don't, Now, since we all love to browse files and tar files all
since many terminal databases are broken. over the disk, it's common that you will leave a tar file
and the re-enter it later. Since uncompression is slow,
You can move around with the Tab key, with the vi moving the Midnight Commander will cache the information in mem-
keys ('h' left, 'j' down, 'k' up and 'l' right) and after ory for a limited amount of time, after you hit the time-
you press any arrow key once (this will mark it OK), then out, all of the resources associated with the file system
you can use that key as well. will be freed. The default timeout is set to one minute.
You test them just by pressing each of them. As soon as The FTP File System keeps the directory listing it fetches
you press a key and the key works properly, OK should from a ftp server in a cache. The cache expire time is
appear next to the name of that key. Once a key is marked configurable with the ftpfs directory cache timeout
OK it starts to work as usually, e.g. F1 for the first option. A low value for this option may slow down every
time will just check that F1 works OK, but from that time operation on the ftp file System because every operation
on it will show help. The same applies to the arrow keys. is accompanied by a query of the ftp server.
Tab key should be working always.
Moreover you can define a proxy host for doing ftp trans-
If some keys do not work properly, then you won't see OK fers and configure the Midnight Commander to always use
after the key name after you have pressed that key. You the proxy host. See the section on FTP File System for
may then want to fix it. You do it by pressing the button more information.
of that key (either by mouse or using Tab and Enter).
Then a red message will appear and you will be asked to
0 '*
Layout it may not handle all of the nice macro expansion and sub-
The layout dialog gives you a possibility to change the stitution that your shell does, although it does some of
general layout of screen. You can specify whether the them:
menubar, the command prompt, the hintbar and the function
keybar are visible. On the Linux or SCO console you can Tilde substitution The (~) will be substituted with your
specify how many lines are shown in the output window. home directory, if you append a username after the tilde,
then it will be substituted with the login directory of
The rest of the screen area is used for the two directory the the specified user.
panels. You can specify whether the area is split to the
panels in vertical or horizontal direction. The split can For example, ~guest is the home directory for the user
be equal or you can specify an unequal split. guest, while ~/guest is the directory guest in your home
directory.
By default all contents of the directory panels are dis-
played with the same color, but you can specify whether Previous directory You can jump to the directory you were
permissions and file types are highlighted with special previously by using the special directory name '-' like
Colors. If permission highlighting is enabled, the parts this: cd -
of the perm and mode display fields which are valid for
the user running Midnight Commander are highlighted with CDPATH directories If the directory specified to the cd
the color defined with the selected keyword. If file type command is not in the current directory, then The Midnight
highlighting is enabled, files are colored according to Commander uses the value in the environment variable
their file type (e.g. directory, core file, executable, CDPATH to search for the directory in any of the named
...). directories.
If the Show Mini-Status option is enabled, one line of For example you could set your CDPATH variable to
status information about the currently selected item is ~/src:/usr/src, allowing you to change your directory to
showed at the bottom of the panels. any of the directories inside the ~/src and /usr/src
directories, from any place in the file system by using
it's relative name (for example cd linux could take you to
Save Setup /usr/src/linux).
At startup the Midnight Commander will try to load
initialization information from the ~/.mc/ini file. If
this file doesn't exist, it will load the information from Macro Substitution
the system-wide configuration file, located in When accessing a user menu, or executing an extension
/usr/lib/mc/mc.ini. If the system-wide configuration file dependent command, or running a command from the command
doesn't exist, MC uses the default settings. line input, a simple macro substitution takes place.
The Save Setup command creates the ~/.mc/ini file by sav- The macros are:
ing the current settings of the Left, Right and Options
menus. %i
If you activate the auto save setup option, MC will always The indent of blank space, equal the cursor column
save the current settings when exiting. position. For edit menu only.
%k
Similar to the %t and %T macros, but in addition If you are using bash you can specify startup commands for
the files are untagged. You can use this macro only the subshell in your ~/.mc/bashrc file and special key-
once per menu file entry or extension file entry, board maps in the ~/.mc/inputrc file. tcsh users may
because next time there will be no tagged files. specify startup commands in the ~/.mc/tcshrc file.
%s and %S When the subshell code is used, you can suspend applica-
tions at any time with the sequence C-o and jump back to
The selected files: The tagged files if there are the Midnight Commander, if you interrupt an application,
any. Otherwise the current file. you will not be able to run other external commands until
you quit the application you interrupted.
%q
An extra added feature of using the subshell is that the
Dropped files. In all places except in the Drop prompt displayed by the Midnight Commander is the same
action of the mc.ext file, this will become a null prompt that you are currently using in your shell.
string, in the Drop action it will be replaced with
a space separated list of files that were dropped The OPTIONS section has more information on how you can
on the file. control the subshell code.
%cd
Controlling Midnight Commander
This is a special macro that is used to change the The Midnight Commander defines an environment variable
current directory to the directory specified in MC_CONTROL_FILE. The commands executed by MC may give
front of it. This is used primarily as an inter- instructions to MC by writing to the file specified by
face to the Virtual File System. this variable. This is only available if you compiled
your copy of the Midnight Commander with the WANT_PARSE
%view option.
This macro is used to invoke the internal viewer. The following instructions are supported.
This macro can be used alone, or with arguments.
If you pass any arguments to this macro, they clear_tags Clear all tags.
should be enclosed in brackets. tag <filename> Tag specified file.
untag <filename> Untag specified file.
The arguments are: ascii to force the viewer into select <filename> Move pointer to file.
ascii mode; hex to force the viewer into hex mode; change_panel Switch between panels.
nroff to tell the viewer that it should interpret cd <path> Change directory.
the bold and underline sequences of nroff; unfor-
matted to tell the viewer to not interpret nroff If the first letter of the instruction is in lower case it
commands for making the text bold or underlined. operates on the current panel. If the letter is in upper
case the instruction operates on the other panel. The
%% additional letters must be in lower case. Instructions
' '!
must be separated by exactly one space, tab or newline. rently being operated on and there are at most three
The instructions don't work in the Info, Tree and Quick progress bars. The file bar tells how big part of the cur-
views. The first error causes the rest to be ignored. rent file has been copied so far. The count bar tells how
many of tagged files have been handled so far. The bytes
bar tells how big part of total size of the tagged files
Chmod has been handled so far. If the verbose option is off the
The Chmod window is used to change the attribute bits in a file and bytes bars are not shown.
group of files and directories. It can be invoked with
the C-x c key combination. There are two buttons at the bottom of the dialog. Press-
ing the Skip button will skip the rest of the current
The Chmod window has two parts - Permissions and File file. Pressing the Abort button will abort the whole oper-
ation, the rest of the files are skipped.
In the File section are displayed the name of the file or
directory and its permissions in octal form, as well as There are three other dialogs which you can run into dur-
its owner and group. ing the file operations.
In the Permissions section there is a set of check buttons The error dialog informs about error conditions and has
which correspond to the file attribute bits. As you three choices. Normally you select either the Skip button
change the attribute bits, you can see the octal value to skip the file or the Abort button to abort the opera-
change in the File section. tion altogether. You can also select the Retry button if
you fixed the problem from another terminal.
To move between the widgets (buttons and check buttons)
use the arrow keys or the Tab key. To change the state of The replace dialog is shown when you attempt to copy or
the check buttons or to select a button use Space. You move a file on the top of an existing file. The dialog
can also use the hotkeys on the buttons to quickly acti- shows the dates and sizes of the both files. Press the Yes
vate that selection (they are the highlit letters on the button to overwrite the file, the No button to skip the
buttons). file, the alL button to overwrite all the files, the nonE
button to never overwrite and the Update button to over-
To set the attribute bits, use the Enter key. write if the source file is newer than the target file.
You can abort the whole operation by pressing the Abort
When working with a group of files or directories, you button.
just click on the bits you want to set or clear. Once you
have selected the bits you want to change, you select one The recursive delete dialog is shown when you try to
of the action buttons (Set marked or Clear marked). delete a directory which is not empty. Press the Yes but-
ton to delete the directory recursively, the No button to
Finally, to set the attributes exactly to those specified, skip the directory, the alL button to delete all the
you can use the [Set all] button, which will act on all directories and the nonE button to skip all the non-empty
the tagged files. directories. You can abort the whole operation by pressing
the Abort button. If you selected the Yes or alL button
[Marked all] set only marked attributes to all selected you will be asked for a confirmation. Type "yes" only if
files you are really sure you want to do the recursive delete.
[Set marked] set marked bits in attributes of all selected If you have tagged files and perform an operation on them
files only the files on which the operation succeeded are
untagged. Failed and skipped files are left tagged.
[Clean marked] clear marked bits in attributes of all
selected files
Mask Copy/Rename
[Set] set the attributes of one file The copy/move operations lets you translate the names of
files in an easy way. To do it, you have to specify the
[Cancel] cancel the Chmod command correct source mask and usually in the trailing part of
the destination specify some wildcards. All the files
matching the source mask are copied/renamed according to
Chown the target mask. If there are tagged files, only the
The Chown command is used to change the owner/group of a tagged files matching the source mask are renamed.
file. The hot key for this command is C-x o.
There are other option which you can set:
Advanced Chown Follow links tells whether make the symlinks and hardlinks
The Advanced Chown command is the Chmod and Chown command in the source directory (recursively in subdirectories)
combined into one window. You can change the permissions new links in the target directory or whether would you
and owner/group of files at once. like to copy their content.
You want to copy content of a directory foo to /bla/foo, For example, if the source mask is '*' (shell patterns on)
which is an already existing directory. Normally (when or '^\(.*\)$' (shell patterns off) and the target mask is
Dive is not set), mc would copy it exactly into /bla/foo. '\L\u*' the file names will be converted to have initial
By enabling this option you will copy the content into upper case and otherwise lower case.
/bla/foo/foo, because the directory already exists.
You can also use '\' as a quote character. For example,
Preserve attributes tells whether to preserve the original '\\' is a backslash and '\*' is an asterisk.
files' permissions, timestamps and if you are root whether
to preserve the original files' UID and GID. If this
option is not set the current value of the umask will be Internal File Viewer
respected. The internal file viewer provides two display modes: ASCII
and hex. To toggle between modes, use the F4 key. If you
Use shell patterns on have the GNU gzip program installed, it will be used to
automatically decompress the files on demand.
When the shell patterns option is on you can use the '*'
and '?' wildcards in the source mask. They work like they The viewer will try to use the best method provided by
do in the shell. In the target mask only the '*' and your system or the file type to display the information.
'\<digit>' wildcards are allowed. The first '*' wildcard The internal file viewer will interpret some string
in the target mask corresponds to the first wildcard group sequences to set the bold and underline attributes, thus
in the source mask, the second '*' corresponds to the sec- making a pretty display of your files.
ond group and so on. The '\1' wildcard corresponds to the
first wildcard group in the source mask, the '\2' wildcard When in hex mode, the search function accepts text in
corresponds to the second group and so on all the way up quotes and constant numbers. Text in quotes is matched
to '\9'. The '\0' wildcard is the whole filename of the exactly after removing the quotes. Each number matches
source file. one byte. You can mix quoted text with constants like
this:
Two examples:
"String" -1 0xBB 012 "more text"
If the source mask is "*.tar.gz", the destination is
"/bla/*.tgz" and the file to be copied is "foo.tar.gz", Note that 012 is an octal number. -1 is converted to
the copy will be "foo.tgz" in "/bla". 0xFF.
Let's suppose you want to swap basename and extension so Some internal details about the viewer: On systems that
that "file.c" will become "c.file" and so on. The source provide the mmap(2) system call, the program maps the file
mask for this is "*.*" and the destination is "\2.\1". instead of loading it; if the system does not provide the
mmap(2) system call or the file matches an action that
Use shell patterns off requires a filter, then the viewer will use it's growing
buffers, thus loading only those parts of the file that
When the shell patterns option is off the MC doesn't do you actually access (this includes compressed files).
automatic grouping anymore. You must use '\(...\)' expres-
sions in the source mask to specify meaning for the wild- Here is a listing of the actions associated with each key
cards in the target mask. This is more flexible but also that the Midnight Commander handles in the internal file
requires more typing. Otherwise target masks are similar viewer.
to the situation when the shell patterns option is on.
F1 Invoke the builtin hypertext help viewer.
Two examples:
F2 Toggle the wrap mode.
If the source mask is "^\(.*\)\.tar\.gz$", the destination
is "/bla/*.tgz" and the file to be copied is "foo.tar.gz", F4 Toggle the hex mode.
the copy will be "/bla/foo.tgz".
F5 Goto line. This will prompt you for a line number and
Let's suppose you want to swap basename and extension so will display that line.
that "file.c" will become "c.file" and so on. The source
mask for this is "^\(.*\)\.\(.*\)$" and the destination is F6, /. Regular expression search.
"\2.\1".
?, Reverse regular expression search.
Case Conversions
F7 Normal search / hex mode search.
You can also change the case of the filenames. If you use
'\u' or uppercase or lowercase correspondingly. C-s, F17, n. Start normal search if there was no previous
search expression else find next match.
If you use '\U' or '\L' in the target mask the next char-
acters will be converted to uppercase or lowercase corre- C-r. Start reverse search if there was no previous search
spondingly up to the next expression else find next match.
'- '&
and you can override the mouse as usual by holding down
F8 Toggle Raw/Parsed mode: This will show the file as the shift key while dragging the mouse to let normal ter-
found on disk or if a processing filter has been specified minal mouse highlighting work.
in the mc.ext file, then the output from the filter. Cur-
rent mode is always the other than written on the button To define a macro, press Ctrl-R
label, since on the button is the mode which you enter by and then type out the key strokes you want to be exe-
that key. cuted. Press Ctrl-R
again when finished. You can then assign the macro to any
F9 Toggle the format/unformat mode: when format mode is on key you like by pressing that key. The macro is executed
the viewer will interpret some string sequences to show when you press Ctrl-A and then the assigned key. The macro
bold and underline with different colors. Also, on button is also executed if you press Meta, Ctrl, or Esc and the
label is the other mode than current. assigned key, provided that the key is not used for any
other function. Once defined, the macro commands go into
F10, Esc. Exit the internal file viewer. the file .cedit/cooledit.macros
in your home directory. You can delete a macro by delet-
next-page, space, C-v. Scroll one page forward. ing the appropriate line in this file.
prev-page, M-v, C-b, backspace. Scroll one page backward. F19 will format the currently highlighted block (plain
text or C or C++ code or another). This is controlled by
down-key Scroll one line forward. the file /usr/lib/mc/edit.indent.rc which is copied to
.cedit/edit.indent.rc in your home directory the first
up-key Scroll one line backward. time you use it.
C-l Refresh the screen. You can use scanf search and replace to search and replace
a C format string. First take a look at the sscanf and
C-o Switch to the subshell and show the command screen. sprintf man pages to see what a format string is and how
it works. An example is as follows: Suppose you want to
! Like C-o, but run a new shell if the subshell is not replace all occurrences of say, an open bracket, three
running. comma separated numbers, and a close bracket, with the
word apples, the third number, the word oranges and then
[n] m Set the mark n. the second number, I would fill in the Replace dialog box
as follows:
[n] r Jump to the mark n.
Enter search string
C-f Jump to the next file. (%d,%d,%d)
Enter replace string
C-b Jump to the previous file. apples %d oranges %d
Enter replacement argument order
M-r Toggle the ruler. 3,2
It's possible to instruct the file viewer how to display a The last line specifies that the third and then the second
file, look at the Extension File Edit section number are to be used in place of the first and second.
Internal File Editor It is advisable to use this feature with Prompt on replace
The internal file editor provides most of the features of on, because a match is thought to be found whenever the
common full screen editors. It is invoked using F4 pro- number of arguments found matches the number given, which
vided the use_internal_edit option is set in the initial- is not always a real match. Scanf also treats whitespace
ization file. It has an extensible file size limit of six- as being elastic. Note that the scanf format % is very
teen megabytes and edits binary files flawlessly. useful for scanning strings, and whitespace.
The features it presently supports are: Block copy, move, The editor also displays non-us characters (160+). When
delete, cut, paste; key for key undo ; pull-down menus; editing binary files, you should set display bits to 7
file insertion; macro definition; regular expression bits in the options menu to keep the spacing clean.
search and replace (and our own scanf-printf search and
replace); shift-arrow MSW-MAC text highlighting (for the See also the file README.edit in the source tree for some
linux console only); insert-overwrite toggle; and an more info.
option to pipe text blocks through shell commands like
indent.
Completion
The editor is very easy to use and requires no tutoring. Let the Midnight Commander type for you.
To see what keys do what, just consult the appropriate
pull-down menu. Other keys are: Shift movement keys do Attempt to perform completion on the text before current
text highlighting. Ctrl-Ins copies to the file position. MC attempts completion treating the text as
cooledit.clip and Shift-Ins pastes from cooledit.clip. variable (if the text begins with $ ), username (if the
Shift-Del cuts to cooledit.clip, and Ctrl-Del deletes text begins with ~ ), hostname (if the text begins with @
highlighted text. The completion key also does a Return ) or command (if you are on the command line in the posi-
with an automatic indent. Mouse highlighting also works, tion where you might type a command, possible completions
'0 -*
then include shell reserved words and shell builtin com- Examples:
mands as well) in turn. If none of these produces a match,
filename completion is attempted. /#ftp:ftp.nuclecu.unam.mx/linux/local
/#ftp:tsx-11.mit.edu/pub/linux/packages
Filename, username, variable and hostname completion works /#ftp:!behind.firewall.edu/pub
on all input lines, command completion is command line /#ftp:guest@remote-host.com:40/pub
specific. If the completion is ambiguous (there are more /#ftp:miguel:xxx@server/pub
different possibilities), MC beeps and the following
action depends on the setting of the Complete: show all To connect to sites behind a firewall, you will need to
option in the Configuration dialog. If it is enabled, a use the prefix ftp://! (ie, with a bang character after
list of all possibilities pops up next to the current the double slash) to make the Midnight Commander use a
position and you can select with the arrow keys and Enter proxy host for doing the ftp transfer. You can define the
the correct entry. You can also type the first letters in proxy host in the Virtual File System dialog box.
which the possibilities differ to move to a subset of all
possibilities and complete as much as possible. If you Another option to set is the Always use ftp proxy option
press M-Tab again, only the subset will be shown in the in the Virtual File System dialog box. This will config-
listbox, otherwise the first item which matches all the ure the program to always use the proxy host. If this
previous characters will be highlighted. As soon as there variable is set, the program will do two things: consult
is no ambiguity, dialog disappears, but you can hide it by the /usr/lib/mc/mc.no_proxy file for lines containing host
canceling keys Esc, F10 and left and right arrow keys. If names that are local (if the host name starts with a dot,
Complete: show all is disabled, the dialog pops up only if it is assumed to be a domain) and to assume that any host-
you press M-Tab for the second time, for the first time MC names without dots in their names are directly accessible.
just beeps.
If you are using the ftpfs code with a filtering packet
router that does not allow you to use the regular mode of
Virtual File System opening files, you may want to force the program to use
The Midnight Commander is provided with a code layer to the passive-open mode. To use this, set the
access the file system; this code layer is known as the ftpfs_use_passive_connections option in the initialization
virtual file system switch. The virtual file system file.
switch allows the Midnight Commander to manipulate files
not located on the Unix file system. The Midnight Commander keeps the directory listing in a
cache. The cache expire time is configurable in the Vir-
Currently the Midnight Commander is packaged with some tual File System dialog box. This has the funny behavior
Virtual File Systems (VFS): the local file system, used that even if you make changes to a directory, they will
for accessing the regular Unix file system; the ftpfs, not be reflected in the directory listing until you force
used to manipulate files on remote systems with the FTP a cache reload with the C-r key. This is a feature (when
protocol; the tarfs, used to manipulate tar and compressed you think it's a bug, think about manipulating files on
tar files; the undelfs, used to recover deleted files on the other side of the Atlantic with ftpfs).
ext2 file systems (the default file system for Linux sys-
tems), fish (for manipulating files over shell connections
such as rsh and ssh) and finally the mcfs (Midnight Com- Tar File System
mander file system), a network based file system. The tar file system provides you with read-only access to
your tar files and compressed tar files by using the chdir
The VFS switch code will interpret all of the path names command. To change your directory to a tar file, you
used and will forward them to the correct file system, the change your current directory to the tar file by using the
formats used for each one of the file systems is described following syntax:
later in their own section.
/filename.tar:utar/[dir-inside-tar]
FTP File System The mc.ext file already provides a shortcut for tar files,
The ftpfs allows you to manipulate files on remote this means that usually you just point to a tar file and
machines, to actually use it, you may try to use the panel press return to enter into the tar file, see the Extension
command FTP link (accessible from the menubar) or you may File Edit section for details on how this is done.
directly change your current directory to it using the cd
command to a path name that looks like this: Examples:
/#ftp:[!][user[:pass]@]machine[:port][remote-dir] mc-3.0.tar.gz#utar/mc-3.0/vfs
/ftp/GCC/gcc-2.7.0.tar#utar
The, user, port and remote-dir elements are optional. If
you specify the user element, then the Midnight Commander The latter specifies the full path of the tar archive.
will try to logon on the remote machine as that user, oth-
erwise it will use your login name. The optional pass FIle transfer over SHell filesystem
element, if present is the password used for the connec- The fish file system is a network based file system that
tion. This use is not recommended (nor keeping this in allows you to manipulate the files in a remote machine as
your hotlist, unless you set the appropriate permissions if they were local. To use this, the other side has to
there, and then, it may not be entirely safe anyways). either run fish server, or has to have bash-compatible
shell.
- -
tion of the first scsi disk on Linux, you would use the
To connect to a remote machine, you just need to chdir following path name:
into a special directory which name is in the following
format: /#undel:sda2
/#sh:[user@]machine[:options]/[remote-dir] It may take a while for the undelfs to load the required
The, user, options and remote-dir information before you start browsing files there.
elements are optional. If you specify the user element
then the Midnight Commander will try to logon on the
remote machine as that user, otherwise it will use your Colors
login name. The Midnight Commander will try to detect if your terminal
supports color using the terminal database and your termi-
The options are 'C' - use compression and 'rsh' use rsh nal name. Sometimes it gets confused, so you may force
instead of ssh. If the remote-dir element is present, your color mode or disable color mode using the -c and -b flag
current directory on the remote machine will be set to respectively.
this one.
If the program is compiled with the Slang screen manager
Examples: instead of ncurses, it will also check the variable COL-
ORTERM, if it is set, it has the same effect as the -c
/#sh:onlyrsh.mx:r/linux/local flag.
/#sh:joe@want.compression.edu:C/private
/#sh:joe@noncompressed.ssh.edu/private You may specify terminals that always force color mode by
adding the color_terminals variable to the Colors section
of the initialization file. This will prevent the Midnight
Network File System Commander from trying to detect if your terminal supports
The Midnight Commander file system is a network base file color. Example:
system that allows you to manipulate the files in a remote [Colors]
machine as if they were local. To use this, the remote color_terminals=linux,xterm
machine must be running the mcserv(8) server program. color_terminals=terminal-name1,terminal-name2...
To connect to a remote machine, you just need to chdir The program can be compiled with both ncurses and slang,
into a special directory which name is in the following ncurses does not provide a way to force color mode:
format: ncurses uses just the information in the terminal
database.
/#mc:[user@]machine[:port][remote-dir]
The Midnight Commander provides a way to change the
The, user, port and remote-dir elements are optional. If default colors. Currently the colors are configured using
you specify the user element then the Midnight Commander the environment variable MC_COLOR_TABLE or the Colors sec-
will try to logon on the remote machine as that user, oth- tion in the initialization file.
erwise it will use your login name.
In the Colors section, the default color map is loaded
The port element is used when the remote machine running from the base_color variable. You can specify an alter-
on a special port (see the mcserv(8) manual page for more nate color map for a terminal by using the terminal name
information about ports); finally, if the remote-dir ele- as the key in this section. Example:
ment is present, your current directory on the remote
machine will be set to this one. [Colors]
base_color=
Examples: xterm=menu=magenta:marked=,magenta:markselect=,red
Undelete File System The colors are optional, and the keywords are: normal,
On Linux systems, if you asked configure to use the ext2fs selected, marked, markselect, errors, input, reverse,
undelete facilities, you will have the undelete file sys- gauge; Menu colors are: menu, menusel, menuhot, menuhot-
tem available. Recovery of deleted files is only avail- sel; Dialog colors are: dnormal, dfocus, dhotnormal,
able on ext2 file systems. The undelete file system is dhotfocus; Help colors are: helpnormal, helpitalic, help-
just an interface to the ext2fs library to: retrieve all bold, helplink, helpslink; Viewer color is: viewunderline;
of the deleted files names on an ext2fs and provides and Special highlighting colors are: executable, directory,
to extract the selected files into a regular partition. link, device, special, core; Editor colors are: editnor-
mal, editbold, editmarked.
To use this file system, you have to chdir into the spe-
cial file name formed by the "/#undel" prefix and the file input determines the color of input lines used in query
name where the actual file system resides. dialogs.
For example, to recover deleted files on the second parti- gauge determines the color of the filled part of the
- -!
progress bar (gauge), which shows how many percent of tion to an ftp server that has denied the login.
files were copied etc. in a graphical way. If the value is zero, the the program will not
retry the login.
The dialog boxes use the following colors: dnormal is used
for the normal text, dfocus is the color used for the cur- ftpfs_use_passive_connections.
rently selected component, dhotnormal is the color used to
differentiate the hotkey color in normal components, This option is by off default. This makes the
whereas the dhotfocus color is used for the highlighted ftpfs code use the passive open mode for transfer-
color in the currently selected component. ring files. This is used by people that are behind
a filtering packet router. This option just works
Menus use the same scheme but uses the menu, menusel, if you are not using an ftp proxy.
menuhot and menuhotsel tags instead.
max_dirt_limit.
Help uses the following colors: helpnormal is used for
normal text, helpitalic is used for text which is empha- Specifies how many screen updates can be skipped at
sized in italic in the manual page, helpbold is used for most in the internal file viewer. Normally this
text which is emphasized in bold in the manual page, value is not significant, because the code automat-
helplink is used for not selected hyperlinks and helpslink ically adjusts the number of updates to skip
is used for selected hyperlink. according to the rate of incoming keypresses. How-
ever, on very slow machines or terminals with a
Special highlight colors determine how files are displayed fast keyboard auto repeat, a big value can make
when file highlighting is enabled (see the section on Lay- screen updates too jumpy.
out). directory is used for directories or symbolic links
to directories; executable for executable files; link is It seems that setting max_dirt_limit to 10 causes
used for symbolic links which are neither stalled nor the best behavior, and that is the default value.
linked to a directory; stalledlink is used for stalled
symbolic links; device - character and block devices; spe- mouse_move_pages.
cial is used for special files, such as FIFOs and IPC
sockets; core is for core files. Controls whenever scrolling with the mouse is done
by pages or line by line on the panels.
The possible colors are: black, gray, red, brightred,
green, brightgreen, brown, yellow, blue, brightblue, mouse_move_pages_viewer.
magenta, brightmagenta, cyan, brightcyan, lightgray and
white. And there is a special keyword for transparent Controls if scrolling with the mouse is done by
background. It is 'default'. The 'default' can only be pages or line by line on the internal file viewer.
used for background color. Example:
[Colors] old_esc_mode
base_color=normal=white,default:marked=magenta,default
By default the Midnight Commander treats the ESC
key as a key prefix (old_esc_mode=0), if you set
Special Settings this option (old_esc_mode=1), then the ESC key will
Most of the settings of the Midnight Commander can be act as a prefix key for one second, and if no extra
changed from the menus. However, there are a small number keys have arrived, then the ESC key is interpreted
of settings which can only be changed by editing the setup as a cancel key (ESC ESC).
file.
The directory list for the directory tree and tree BUGS
view features. See the file TODO in the distribution for information on
what remains to be done.
./.mc.menu
If you want to report a problem with the program, please
Local user-defined menu. If this file is present it send mail to this address: mc-devel@gnome.org.
is used instead of the home or system-wide applica-
tions menu. Provide a detailed description of the bug, the version of
the program you are running (mc -V display this informa-
tion), the operating system you are running the program on
LICENSE and if the program crashes, we would appreciate a stack
This program is distributed under the terms of the GNU trace.
General Public License as published by the Free Software
Foundation. See the built-in help for details on the
License and the lack of warranty.
USAGE
AUTHORS mcedit [[+number] file [-bcCdfhstVx?]]
Miguel de Icaza (miguel@ximian.com), Janne Kukonlehto
(jtklehto@paju.oulu.fi), Radek Doulik (rodo@ucw.cz), Fred DESCRIPTION
Leeflang (fredl@nebula.ow.org), Dugan Porter Mcedit is a link to mc, the Midnight Commander, forcing it
(dugan@b011.eunet.es), Jakub Jelinek (jj@sun- to immediately start its internal editor. The editor is a
site.mff.cuni.cz), Ching Hui (mr854307@cs.nthu.edu.tw), terminal version of the cooledit standalone X Window edi-
Andrej Borsenkow (borsenkow.msk@sni.de), Norbert Warmuth tor.
(nwarmuth@privat.circular.de), Mauricio Plaza (mok@rox-
anne.nuclecu.unam.mx), Paul Sheer (psheer@icon.co.za), OPTIONS
Pavel Machek (pavel@ucw.cz) and Pavel Roskin +number
(proski@gnu.org) are the developers of this package. Go to the line specified by number (do not insert
Alessandro Rubini (rubini@ipvvis.unipv.it) has been espe- a space between the "+" sign and the number).
cially helpful debugging and enhancing the program's mouse
support, John Davis (davis@space.mit.edu) also made his S- -b Forces black and white display.
Lang library available to us under the GPL and answered my
questions about it, and the following people have con- -c Force color mode on terminals where mcedit defaults
tributed code and many bug fixes (in alphabetical order): to black and white.
editor_option_save_mode /usr/lib/mc/mc.ini
(0, 1 or 2.) The save mode (see the options menu
also) allows you to change the method of saving a The default system-wide setup for the Midnight Com-
file. Quick save (0) saves the file by immediately, mander, used only if the user lacks his own
truncating the disk file to zero length (i.e. eras- ~/.mc.ini file.
ing it) and the writing the editor contents to the
file. This method is fast, but dangerous, since a /usr/lib/mc/mc.lib
system error during a file save will leave the file
only partially written, possibly rendering the data Global settings for the Midnight Commander. Set-
irretrievable. When saving, the safe save (1) tings in this file are global to any Midnight Com-
option enables creation of a temporary file into mander, it is useful to define site-global terminal
which the file contents are first written. In the settings.
event of an problem, the original file is
untouched. When the temporary file is successfully $HOME/.mc.ini
written, it is renamed to the name of the original
file, thus replacing it. The safest method is cre- User's own setup. If this file is present then the
ate backups (2). Where a backup file is created setup is loaded from here instead of the system-
before any changes are made. You can specify your wide startup file.
own backup file extension in the dialog. Note that
saving twice will replace your backup as well as $HOME/.cedit/
your original file.
User's own temporary directory where block commands
are processed and saved.
Miscellaneous
(Scanf search and replace have previously not worked prop-
erly. With this release, problems with search and replace LICENSE
have been fixed.) This program is distributed under the terms of the GNU
General Public License as published by the Free Software
You can use scanf search and replace to search and replace Foundation. See the built-in help of the Midnight Comman-
a C format string. First take a look at the sscanf and der for details on the License and the lack of warranty.
sprintf man pages to see what a format string is and how
it works. An example is as follows: Suppose you want to AVAILABILITY
replace all occurrences of say, an open bracket, three The latest version of this program can be found at
comma separated numbers, and a close bracket, with the ftp://ftp.gnome.org/mirror/gnome.org/stable/sources/mc/
word apples, the third number, the word oranges and then and on the mirrors listed on the GNOME site
the second number, you would fill in the Replace dialog http://www.gnome.org/.
box as follows:
SEE ALSO
Enter search string cooledit(1), mc(1), gpm(1), terminfo(1), scanf(3).
(%d,%d,%d)
& &'
DESCRIPTION
AUTHORS mingetty est un getty minimal pour l'utilisation des con-
Paul Sheer (psheer@obsidian.co.za) is the developer of the soles virtuelles. Contrairement à agetty(8), mingetty
Midnight Commander's internal editor. n'est pas utilisable pour les lignes série. Pour cette
utilisation précise, je recommande mgetty(8).
BUGS
See the file README.edit in the distribution for more
information. OPTIONS
--noclear
N'efface pas l'écran avant d'afficher l'invite de
login (l'écran est effacé par défaut).
30 January 1997 mcedit(1)
--long-hostname
Par défaut, le nom de la machine hôte est tronqué
%( %( au premier point. Cette option permet d'afficher
le nom complet obtenu par gethostname().
EXEMPLE
Linux 7 Août 2000 MESG(1) "Linux eos i386 #1 Mar 19 21:54:09 MET 1996" a été produit
par le contenu suivant de /etc/issue: "\s \n \m \v"
VOIR AUSSI
NOM
mgetty(8), agetty(8).
mingetty - Getty minimal pour la console.
SYNOPSIS
mingetty [--noclear] [--long-hostname] tty
AUTEUR
Copyright (C) 1996 Florian La Roche <florian@suse.de> ou
&- &&
<florian@jurix.jura.uni-sb.de>. Page man écrite par David !( " & !( "
Frey <David.Frey@eos.lugs.ch> et Florian La Roche.
TRADUCTION
Guillaume Allègre <guillaume.allegre@mail.dotcom.fr>, Jan- NOM
vier 1999 mkfs - Créér un système de fichiers Linux.
SYNOPSIS
mkfs [ -V ] [ -t fstype ] [ fs-options ] filesys [
nb_blocs ]
Debian 5 Mai 1999 MINGETTY(8)
DESCRIPTION
mkfs est utilisé pour formater un système de fichiers
Linux sur un périphérique, généralement une partition de
disque dur. filesys est soit le nom du périphérique (ex:
# # /dev/hda1, /dev/sdb2) ou le point de montage (e.g. /,
/usr, /home) du système de fichiers. nb_blocs est le nom-
bre de blocs à utiliser pour le système de fichiers.
SYNOPSIS En fait, mkfs est simplement une interface pour les divers
mkdir [-p] [-m mode] [--parents] [--mode=mode] [--help] formatteurs de système de fichiers. (mkfs.type_de_fs)
[--version] rep... disponibles sous Linux. Le formateur du système de
fichier voulu est recherché dans un certain nombre de
DESCRIPTION répertoires (/sbin, /sbin/fs, /sbin/fs.d, /etc/fs, /etc)
Cette page de manuel documente la version GNU mkdir. (la liste exacte est définie au moment de la compilation
mais contient au moins /sbin et /sbin/fs), puis en cas
mkdir crée un répertoire correspondant à chacun des noms d'échec dans les répertoires listés par la variable
mentionnés. d'environnement PATH. Veuillez consulter la page de
manuel spécifique au système de fichier désiré pour plus
Par défaut, les répertoires sont créés avec les permis- de détails.
sions d'accès 0777 moins les bits positionnés dans le
umask. OPTIONS
-V Génère plus de messages, notamment toutes les com-
OPTIONS mandes exécutées. Indiquer cette option plusieurs
-m, --mode mode fois inhibibe l'éxécution de toute commande
Créer les répertoires avec le mode d'accès indiqué. spécifique au système de fichiers. Ceci n'est
Celui-ci est donné sous forme symbolique, comme utile que pour faire des tests.
dans chmod(1), en utilisant le mode par défaut
comme valeur de départ. -t fstype
Indique le type de système de fichiers à formater.
-p, --parents S'il n'est pas indiqué, le type est déduit de la
S'assurer que chaque répertoire indiqué existe. ligne correspondante du fichier /etc/fstab. Sinon
Créer les répertoires parents manquants. Ces le format par défaut (ext2) est utilisé.
derniers sont créés avec l'autorisation d'accès
umask modifiée par `u+wx'. Ne pas considérer les fs-options
répertoires déjà existants comme des erreurs. Options spécifiques au système de fichiers employé
à passer au "vrai" formateur. La plupart des
--help Afficher un message d'aide sur la sortie standard, options suivantes sont supportés par la majorité
et terminer normalement. des formatteurs de système de fichiers. Attention,
il peut y avoir des exceptions.
--version
Afficher un numéro de version sur la sortie stan- -c Vérifie le périphérique pour éliminer les secteurs
dard, et terminer normalement. défectueux avant de formater le système de
fichiers.
TRADUCTION -l nom_de_fichier
Christophe Blaess, 1997. Lit la liste des secteurs défectueux depuis le
nom_de_fichier
&0 0*
être mélangées avec les options spécifiques au système de Les fichiers en mode bloc sont des périphériques comme des
fichiers. Certains formateurs ne reconnaissent pas disques (où les données sont accessibles à travers un
l'option -v (mode volubile), ou retournent un code numéro de bloc, et où il est intéressant d'avoir une
d'erreur incompréhensible. De plus, certains programmes mémoire cache par bloc). Tous les autres périphériques
spécifiques à un système de fichiers ne peuvent détecter sont en mode caractère. Autrefois la distinction se fai-
la taille du périphérique et nécessitent le passage du sait autrement, les entrées/sorties en mode bloc étaient
paramètre blocks . bufferisées, pas les autres.
AUTEURS
David Engel (david@ods.com) Les arguments fournis à la suite du nom indiquent le type
Fred N. van Kempen (waltje@uwalt.nl.mugnet.org) de fichier à créer :
Ron Sommeling (sommel@sci.kun.nl)
Cette page de manuel est une simple adaptation de celle de p pour une FIFO
Remy Card (le concepteur du système de fichier étendu 2,
le standard de facto sous Linux). b pour un fichier spécial en mode bloc (avec buffer)
--version
Afficher un numéro de version sur la sortie stan-
dard, et terminer normalement.
NOM
mknod - Créer des fichiers spéciaux. CONFORMITÉ
POSIX ne décrit pas cette commande, considérée comme non
SYNOPSIS portable, et recommende d'utiliser plutôt mkfifo(1) pour
mknod [options] nom {bcu} numéro_majeur numéro_mineur créer des FIFOs. SVID dispose d'une commande /etc/mknod
mknod [options] nom p ayant la même syntaxe mais sans l'option mode.
Options:
[-m mode] [--mode=mode] [--help] [--version] NOTES
Sur un système Linux (1.3.22 ou plus récent) le fichier
DESCRIPTION /usr/src/linux/Documentation/devices.tex contient une
mknod crée une FIFO, un fichier spécial en mode caractère, liste des noms de périphériques, avec le type, et les
ou un fichier spécial en mode bloc, avec le nom indiqué. numéros majeurs et mineurs.
Un fichier spécial est un ensemble de trois valeurs (une VOIR AUSSI
booléenne, et deux entiers) enregistré dans un système de chmod(1), mkfifo(1), mknod(2).
fichiers. La valeur booléenne indique s'il s'agit d'un
fichier caractères ou blocs, et les deux entiers corre- TRADUCTION
spondent aux numéros majeur et mineur. Christophe Blaess, 1997.
Ainsi un fichier spécial ne prend quasiment pas de place
sur le disque, et est utilisé pour dialoguer avec le
système d'exploitation, pas pour enregistrer des données. FSF 15 Décembre 1998 MKNOD(1)
Généralement les fichiers spéciaux concernent des
périphériques matériels (disques, bandes, ttys, impri-
mantes) ou des services fournis par le système d'exploita-
tion (/dev/null, /dev/random).
0 0
% % avez toutes oubliées, tâchez de vous souvenir de
celle-la.
(i) La commande
' " & ' " mount -a [-t type]
(généralement exécutée dans un script de démarrage) monte
tous les systèmes de fichiers indiqués dans fstab (ou
uniquement ceux du type indiqué), à l'exception de ceux
dont la ligne contient le mot-clé noauto.
NOM
mount - Monter un système de fichiers. (ii) Lorsque l'on monte un système de fichiers mentionné
dans la fstab, il suffit d'indiquer le point de montage,
SYNOPSIS ou le périphérique.
mount [-hV]
(iii) Normalement, seul le Super-Utilisateur peut monter
mount -a [-fnrvw] [-t type] des systèmes de fichiers. Néanmoins, si la ligne de la
mount [-fnrvw] [-o options [,...]] périph | rép fstab contient l'option user, n'importe quel utilisateur
mount [-fnrvw] [-t type] [-o options] périph rép peut monter le système de fichiers correspondant.
DESCRIPTION Ainsi, avec une ligne
Tout fichier accessible par un système Unix est inséré /dev/cdrom /cd iso9660 ro,user,noauto,unhide
dans une grande arborescence, la hiérarchie des fichiers, dans la fstab, n'importe quel utilisateur peut monter le
commençant à la racine /. Ces fichiers peuvent résider système iso9660 se trouvant sur son CDROM en utilisant la
sur différents périphériques. La commande mount permet commande
d'attacher un système de fichiers trouvé sur un mount /dev/cdrom
périphérique quelconque à la grande arborescence du ou
système. A l'inverse umount(8) le détachera à nouveau. mount /cd
Pour plus de details, voir fstab(5).
La forme standard de la commande mount est
mount -t type périphérique répertoire Les programmes mount et umount maintiennent une liste des
Ceci indique au noyau d'attacher le système de fichiers se périphériques actuellement montés dans le fichier
trouvant sur le périphérique mentionné (dont on précise le /etc/mtab. Si mount est invoqué sans arguments, cette
type) dans le répertoire indiqué. Le contenu précédent du liste est affichée. Quand le système proc est monté (dis-
répertoire (s'il n'était pas vide), ainsi que son pro- ons sur /proc), les fichiers /etc/mtab et /proc/mounts
priétaire et ses modes d'accès initiaux deviennent invisi- sont très semblables. Le premier contient un peu plus
bles tant que le nouveau système de fichiers reste monté. d'informations, par exemple les options de montage, mais
n'est pas obligatoirement à jour. (cf l'option -n plus
Le chemin d'accès du répertoire représente alors la racine bas).
du système de fichiers se trouvant sur le périphérique.
-w Montage du système de fichiers en lecture/écriture. nodev Ne pas interpréter les fichiers spéciaux de
Il s'agit de l'option par défaut. Un synonyme en périphériques présents sur le système de
est -o rw. fichiers.
unhide Montrer également les fichiers cachés, et les Les options particulièrement utiles sont les suivantes :
fichiers d'extension.
rsize=8192,wsize=8192
block=[512|1024|2048] qui améliorera la vitesse de votre connexion nfs
Fixer la taille de bloc (par défaut : block=1024.) (les tailles des buffers par défaut sont 1024
octets)
conv=a[uto] / conv=b[inary] / conv=m[text] / conv=t[ext]
(par défaut : conv=binary.) Depuis Linux 1.3.54 soft qui permet au noyau de renoncer au bout d'un moment
cette option n'a plus d'effet. (les conversions si le serveur nfs ne répond pas (par défaut le
autres que binaires étaient dangereuses, avec un noyau répète indéfiniment sa requête). On peut
risque important de corruption de données). indiquer un délai avec timeo=time. Ceci est
surtout utile s'il y a des chances pour que le
cruft Si l'octet de poids fort de la longueur d'un serveur nfs soit arrêté, ou redémarre alors que des
fichier contient n'importe quoi, utilisez cette processus essayent d'accéder à ses fichiers.
option pour indiquer à mount d'ignorer ces octets
dans toutes les longueurs de fichiers. Ceci
* *!
Options de montage pour proc
uid=value et gid=value mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024
Ces options sont reconnues, mais n'ont pas d'effet
semble-t-il. va faire correspondre le périphérique boucle /dev/loop3 au
fichier /tmp/fdimage, puis monter ce périphérique sur
/mnt.
Options de montage pour smb
Tout comme nfs, l'implementation smb nécéssite un argument Ce type de montage dispose de trois options, nommées loop,
binaire (une structure smb_mount_data) lors de l'appel offset et encryption, qui sont en réalité des options pour
système. losetup(8).
Cet argument est construit par smbmount(8) et la version Si aucun périphérique loop n'est mentionné explicitement
actuelle de mount (2.5k) ne connait rien en ce qui con- (uniquement l'option `-o loop'), alors mount essayera de
cerne smb. trouver une boucle inutilisée et se l'attribuera.
BOGUES
Options de montage pour vfat Le montage d'un système de fichiers corrompu peut
Tout d'abord les options de montage pour Fat sont recon- déclencher un crash système.
nues. De plus, il existe :
Sous Linux, certains systèmes de fichiers ne supportent
uni_xlate pas l'option -o sync (le système ext2fs supporte les mises
Traduction des caractères Unicode non gérés en à jour synchrones (à la maniere BSD) lorsqu'il est monté
séquence d'échappement spéciales. Ceci permet de avec l'option sync).
sauver et de restaurer des fichiers dont le nom
contient n'importe quel caractère Unicode. Sans L'option -o remount peut parfois s'avérer incapable de
cette option, un '?' est utilisé à la place des modifier les paramètres de montage (tous les paramètres
caractères dont la traduction est impossible. Le ext2fs, sauf sb, sont modifiables lors d'un remontage par
caractère d'échappement est ':' puisqu'il est de exemple, mais vous ne pouvez pas modifier le gid ou
toute manière illégal dans les noms de fichiers l'umask pour un système fatfs).
vfat. La séquence d'échappement utilisée pour rem-
placer le caractère unicode u est : ':', (u & HISTORIQUE
0x3f), ((u>>6) & 0x3f), (u>>12). Une commande mount est apparue dans UNIX AT&T Version 6.
nonumtail
Essayer d'abord de créer un nom court sans numéro
de séquence avant d'essayer nom~num.ext. Lilo 15 Juillet 1997 MOUNT(8)
SYNOPSIS
LE PÉRIPHÉRIQUE LOOP mv [options] source dest
Il est possible de faire un montage au travers du mv [options] source... répertoire
périphérique loop (boucle). Par exemple la commande : Options:
* *'
[-bfiuv] [-S suffixe_desire] [-V {numbered,existing,sim- arde à effectuer. La variable d'environnement VER-
ple}] [--backup] [--force] [--interactive] [--update] SION_CONTROL peut également être employée, mais
[--verbose] [--suffix=suffixe_desire] [--version-con- cette option est prioritaire. Si VERSION_CONTROL
trol={numbered,existing,simple}] [--help] [--version] n'est pas renseignée, et si cette option n'est pas
fournie, le type de sauvegarde par défaut est
DESCRIPTION `existing'. La valeur de la variable d'environ-
Cette page de manuel documente la version GNU de mv. nement VERSION_CONTROL ou de cet argument corre-
spond à la variable `version-control' d'Emacs. Les
Si le dernier argument est le nom d'un répertoire exis- valeurs acceptées sont (ainsi que les abréviations
tant, mv placera tous les autres fichiers à l'intérieur de uniques) :
ce répertoire, en conservant leurs noms.
`t' ou `numbered'
Sinon, s'il n'y a que deux fichiers indiqués, il déplacera Toujours numéroter les sauvegardes.
le premier pour remplacer le second.
`nil' ou `existing'
Une erreur se produit s'il y a plus de deux fichiers Numéroter la sauvegarde s'il en existe déjà
indiqués et si le dernier argument n'est pas un réper- une, sinon faire une sauvegarde simple.
toire. On ne peut déplacer que des fichiers réguliers au
sein du système de fichiers. `never' ou `simple'
Toujours faire une sauvegarde simple.
Si le fichier destination existant n'est pas accessible en
écriture, si l'entrée standard est un terminal tty, et si
les options -f ou --force ne sont pas indiquées, mv TRADUCTION
demande à l'utilisateur de confirmer l'écrasement du Christophe Blaess, 1997.
fichier. Si la réponse n'est pas affirmative, le fichier
est ignoré.
-f, --force % %
Ecraser les fichiers de destination existants sans
demander confirmation à l'utilisateur.
-i, --interactive
Demander la confirmation pour écraser tout fichier NOM
existant. Si la réponse ne commence pas par `y' ou nice - Exécuter un programme avec une priorité d'ordon-
`Y', le déplacement n'est pas effectué. nancement modifiée.
*- *&
ajoutant un `&' à la fin de la ligne de commande.
Le Super-User peut indiquer un ajustement négatif.
OPTIONS
La priorité peut être ajustée avec nice dans l'intervalle Quand la version GNU de nohup est invoquée avec un seul
-20 (le plus prioritaire) à 19 (le moins prioritaire). argument, elle reconnait les options suivantes :
--version TRADUCTION
Afficher un numéro de version sur la sortie stan- Christophe Blaess, 1997.
dard et terminer normalement.
NAME
' ' passwd - update a user's authentication tokens(s)
SYNOPSIS
NOM passwd [-k] [-l] [-u [-f]] [-d] [-S] [username]
nohup - Exécuter un programme en le rendant insensible aux
déconnexions.
SYNOPSIS DESCRIPTION
nohup commande [arg...] Passwd is used to update a user's authentication token(s).
nohup {--help,--version}
Passwd is configured to work through the Linux-PAM API.
DESCRIPTION Essentially, it initializes itself as a "passwd" service
Cette page de manuel documente la version GNU de nohup. with Linux-PAM and utilizes configured password modules to
authenticate and then update a user's password.
nohup exécute la commande désirée en ignorant les signaux
HANGUP (déconnexion), avec une priorité d'ordonnancement
incrémentée de 5, afin que cette commande continue à A simple entry in the Linux-PAM configuration file for
s'exécuter en arrière-plan après la déconnexion de l'util- this service would be:
isateur.
#
Si le flux de sortie standard est un tty, celui-ci, ainsi # passwd service entry that does strength checking of
que le flux standard d'erreur sont redirigés afin d'être # a proposed password before updating it.
ajoutés au fichier `nohup.out'. #
passwd password requisite \
Si ce fichier n'est pas accessible en écriture, ils sont /usr/lib/security/pam_cracklib.so retry=3
redirigés vers `$HOME/nohup.out'. Si ce dernier fichier passwd password required \
n'est pas non plus accessible en écriture, la commande /usr/lib/security/pam_unix.so use_authtok
n'est pas exécutée. #
*0 *
(passwords); the user wishes to keep their non- from computer support or a vendor. Don't let any-
expired tokens as before. one watch you enter your password. Don't enter
your password to a computer you don't trust or if
things Use the password for a limited time and
-l This option is used to lock the specified account change it periodically.
and it is available to root only. The locking is
performed by rendering the encrypted password into
an invalid string (by prefixing the encrypted Choose a hard-to-guess password.
string with an !). passwd will try to prevent you from choosing a
really bad password, but it isn't foolproof; create
your password wisely. Don't use something you'd
--stdin find in a dictionary (in any language or jargon).
This option is used to indicate that passwd should Don't use a name (including that of a spouse, par-
read the new password from standard input, which ent, child, pet, fantasy character, famous person,
can be a pipe. and location) or any variation of your personal or
account name. Don't use accessible information
about you (such as your phone number, license
-u This is the reverse of the -l option - it will plate, or social security number) or your environ-
unlock the account password by removing the ! pre- ment. Don't use a birthday or a simple pattern
fix. This option is available to root only. By (such as backwards, followed by a digit, or pre-
default passwd will refuse to create a passwordless ceded by a digit. Instead, use a mixture of upper
account (it will not unlock an account that has and lower case letters, as well as digits or
only "!" as a password). The force option -f will punctuation. When choosing a new password, make
override this protection. sure it's unrelated to any previous password. Use
long passwords (say 8 characters long). You might
use a word pair with punctuation inserted, a
-d This is a quick way to disable a password for an passphrase (an understandable sequence of words),
account. It will set the named account password- or the first letter of each word in a passphrase.
less. Available to root only.
-n This will set the minimum password lifetime, in These principles are partially enforced by the system, but
days, if the user's account supports password life- only partly so. Vigilence on your part will make the sys-
times. Available to root only. tem much more secure.
AUTEURS
ps a été écrit initialement par Branko Lankester
(lankeste@fwi.uva.nl). FSF 2 Janvier 1997 PWD(1L)
DESCRIPTION
TRADUCTION Halt enregistre le fait que le système va s'arrêter dans
Christophe Blaess, 1997. le fichier /var/log/wtmp, et ensuite demande au noyau
d'arrêter ou de redémarrer le système. Si halt ou reboot
est appellé quand le système n'est pas dans au niveau
d'exécution 0 ou 6, shutdown(8) sera appelé à la place
Linux 9 Juin 1997 PS(1) (avec l'option -h ou -r).
OPTIONS
-n Ne pas synchroniser le cache avec les disques avant
d'arrêter ou réinitialiser le système
$# $#
-w Ne pas réinitialiser ou arrêter le système mais
enregistre le fait que le système va s'arrêter
(dans le fichier /var/log/wtmp ).
NOM
pwd - Afficher le nom du répertoire de travail en cours. -d Ne pas enregistre le wtmp. L'option -n implique -d.
- &
AUTEUR TRADUCTION
Miquel van Smoorenburg, miquels@cistron.nl Thierry Vignaud <tvignaud@mandrakesoft.com>, 1999.
VOIR AUSSI
shutdown(8), init(1).
Linux 19 Mars 1999 HALT(8)
TRADUCTION
Thierry Vignaud <tvignaud@mandrakesoft.com>, 1999.
SYNOPSIS
renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]
NOM
halt, reboot - Arrêter le système. DESCRIPTION
Renice alters the scheduling priority of one or more running processes.
SYNOPSIS The following who parameters are interpreted as process ID's, process
/sbin/halt [-n] [-w] [-d] [-f] [-i] group ID's, or user names. Renice'ing a process group causes all pro-
/sbin/reboot [-n] [-w] [-d] [-f] [-i] cesses in the process group to have their scheduling priority altered.
Renice'ing a user causes all processes owned by the user to have their
DESCRIPTION scheduling priority altered. By default, the processes to be affected
Halt enregistre le fait que le système va s'arrêter dans are specified by their process ID's.
le fichier /var/log/wtmp, et ensuite demande au noyau
d'arrêter ou de redémarrer le système. Si halt ou reboot Options supported by renice:
est appellé quand le système n'est pas dans au niveau
d'exécution 0 ou 6, shutdown(8) sera appelé à la place -g Force who parameters to be interpreted as process group ID's.
(avec l'option -h ou -r).
-u Force the who parameters to be interpreted as user names.
OPTIONS
-n Ne pas synchroniser le cache avec les disques avant -p Resets the who interpretation to be (the default) process ID's.
d'arrêter ou réinitialiser le système
For example,
-w Ne pas réinitialiser ou arrêter le système mais
enregistre le fait que le système va s'arrêter renice +1 987 -u daemon root -p 32
(dans le fichier /var/log/wtmp ).
would change the priority of process ID's 987 and 32, and all processes
-d Ne pas enregistre le wtmp. L'option -n implique -d. owned by users daemon and root.
-f Force la réinitialion ou l'arrêt sans appeller Users other than the super-user may only alter the priority of processes
shutdown. they own, and can only monotonically increase their ``nice value'' within
the range 0 to PRIO_MAX (20). (This prevents overriding administrative
-i Interrompt l'activité de toutes les interfaces fiats.) The super-user may alter the priority of any process and set the
réseaux avant la réinitialisation ou l'arrêt. priority to any value in the range PRIO_MIN (-20) to PRIO_MAX. Useful
priorities are: 20 (the affected processes will run only when nothing
DIAGNOSTIQUE else in the system wants to), 0 (the ``base'' scheduling priority), any-
Si vous n'êtes pas le super-utilisateur, vous n'obtiendrez thing negative (to make things go very fast).
que le message `must be superuser'.
FILES
NOTES /etc/passwd to map user names to user ID's
Dans les versions précédentes de sysvinit , reboot et halt
ne devaient jamais être appelés directement. A partir de SEE ALSO
cette version, halt et reboot appellent shutdown si le getpriority(2), setpriority(2)
système est dans un niveau d'exécution entre 1 et 5.
BUGS
Non super-users can not increase scheduling priorities of their own pro-
AUTEUR cesses, even if they were the ones that decreased the priorities in the
Miquel van Smoorenburg, miquels@cistron.nl first place.
The Linux kernel (at least version 2.0.0) and linux libc (at least ver-
VOIR AUSSI sion 5.2.18) does not agree entierly on what the specifics of the system-
shutdown(8), init(1). call interface to set nice values is. Thus causes renice to report bogus
previous nice values.
0 *
Supprimer récursivement le contenu des répertoires.
HISTORY
The renice command appeared in 4.0BSD. -v, --verbose
Afficher le nom de chaque fichier avant suppres-
4th Berkeley Distribution June 9, 1993 4th Berkeley Distribution sion.
--version
Afficher le numéro de version sur la sortie stan-
dard, et terminer correctement.
NOM
rm - Effacer des fichiers. TRADUCTION
Christophe Blaess, 1997.
SYNOPSIS
rm [-dfirvR] [--directory] [--force] [--interactive]
[--recursive] [--help] [--version] [--verbose] nom...
FSF 5 Mai 1999 RM(1)
DESCRIPTION
Cette page de manuel documente la version GNU de rm ([NDT]
rm = remove - enlever).
La version GNU de rm, comme tous les programmes utilisant Options POSIX : [-p]
la fonction getopt(3) pour analyser leurs arguments, vous
permet d'utiliser l'option -- pour indiquer que l'argument Options GNU (forme courte): [-p] [--help] [--version] [--]
suivant n'est pas une option. Pour supprimer un fichier rmdir [-p] [--parents] [--help] [--version] répertoire...
nomme `-f' dans le répertoire en cours, on peut utiliser
soit DESCRIPTION
rm -- -f rmdir supprime chaque répertoire vide indiqué. ([NDT]
soit rmdir = Remove Directory).
rm ./-f
La version Unix de rm utilise un unique `-' pour cela, car Tout argument (autre que les options) ne se rapportant pas
elle est antérieure au standard des options analysées par à un répertoire vide est considéré comme une erreur.
getopt().
OPTIONS POSIX
OPTIONS -p Effacer les répertoires parents s'ils deviennent
-d, --directory vides après la suppression des répertoires men-
Efface un répertoire avec `unlink' à la place de tionnés en argument. Ainsi `rmdir -p a/b/c' est
`rmdir', ne nécessitant pas que le répertoire soit équivalent à `rmdir a/b/c; rmdir a/b; rmdir a'.
vide. Seul le Super-User peut utiliser cette
option. Comme un 'unlink' sur un répertoire OPTIONS GNU
déréférence tous les fichiers qui y etaient con- -p, --parents
tenus, il est conseille d'effectuer un fsck sur le Comme décrit ci-dessus.
système de fichiers après cette opération.
--help Afficher un message d'aide sur la sortie standard
-f, --force et terminer correctement.
Ignorer les fichiers non existants, et ne pas
interroger l'utilisateur. --version
Afficher le numéro de version sur la sortie stan-
-i, --interactive dard et terminer correctement.
Demander à l'utilisateur de confirmer l'effacement
de chaque fichier. Si la réponse ne commence pas -- Fin des options.
par `y' ou `Y', le fichier est ignoré.
ENVIRONNEMENT
-r, -R, --recursive Les variables LANG, LC_ALL, LC_CTYPE et LC_MESSAGES ont
leurs significations habituelles. rpm [--uninstall|-e] [options_désinstallation] [paque-
tage]+
CONFORMITÉ rpm [--verify|-V] [options_vérification] [paquetage]+
POSIX 1003.2
Signatures:
NOTES rpm [--verify|-V] [options_vérification] [paquetage]+
La commande `rmdir foo' n'effacer le répertoire foo, que rpm [--resign] [fichier_paquetage]+
s'il est vide. Si on désire effacer également les réper- rpm [--addsign] [fichier_paquetage]+
toires non-vides, il faut utiliser `rm -r foo'.
Divers :
Cette page décrit la version de rmdir fournie dans le rpm [--showrc]
package fileutils-3.16. rpm [--setperms] [paquetage]+
rpm [--setgids] [paquetage]+
TRADUCTION
Christophe Blaess, 1997.
OPTIONS GENERALES
Ces options peuvent être utilisées dans différents modes.
FSF 27 Novembre 1996 RMDIR(1L)
-vv Afficher un tas d'horribles informations de débog-
gage.
--allfiles
Installer ou mettre à niveau tous les fichiers man- OPTIONS DE REQUETE
quants du paquetage, même s'ils existent déjà. La forme générale d'une commande de requête rpm est
Par exemple, pour afficher uniquement les noms des paque- -i Afficher l'information du paquetage, incluant son
tages requis, vous pouvez utiliser %{NOM} comme chaîne de nom, sa version, et sa description. Cette option
caractères de format. Pour afficher de l'information de utilisera --queryformat s'il a été spécifié.
nom et de distribution en deux colonnes, vous pouvez
utiliser %-30{NOM}%{DISTRIBUTION}. -R, --requires
Lister les paquetages desquels dépend ce paquetage.
rpm affichera une liste de toutes les étiquettes qu'il
connaît quand il est invoqué avec l'argument --querytags. --provides
Lister les capacités que fournit ce paquetage.
Il y a deux sous-ensembles d'option pour les requêtes : la
sélection de paquetages et la sélection d'information. --changelog
Lister les informations de modifications de ce
Options de sélection de paquetages : paquetage.
--triggerscripts
Montrer tous les scripts de déclenchement pour les VERIFICATION DE SIGNATURE
paquetages sélectionnés. La forme générale d'une commande de vérification d'une
signature rpm est
--noscripts
--nomd5 Ne pas exécuter les scripts de pré- et de post-
Ignore les erreurs de somme de contrôle MD5 pendant désinstallation.
la vérification.
--notriggers
--nopgp Ne pas exécuter les scripts qui sont déclenchés par
Ignore les erreurs de contrôle PGP pendant la la suppression de ce paquetage.
vérification.
--nodeps
--nofiles Ne pas vérifier les dépendances avant de désin-
Ignore les fichiers manquants pendant la vérifica- staller les paquetages.
tion.
--test Ne pas réellement désinstaller quoi que ce soit,
Le format de sortie est constitué d'une chaîne de juste effectuer un test pour voir si c'est possi-
caractères de 8 caractère, d'un "c" éventuel dénot- ble. Utile en conjonction avec l'option -vv.
tant un fichier de configuration, et ensuite du nom
du fichier. Chacun des 8 caractères dénote le
résultat d'une comparaison d'un attribut du fichier OPTIONS DE CONSTRUCTION
avec la valeur de cet attribut enregistré dans la La forme générale d'une commande de construction rpm est
base de données rpm. Un simple "." (point) signi-
fie que le test s'est bien passé. Les caractères rpm -[b|t]O [options_de_construction] <spec_paque-
suivants dénote l'échec à certains tests : tage>+
--buildroot <répertoire>
Pendant la construction du paquetage, surcharger Si vous voulez être capable de signer les paquetages que
l'étiquette de Construction de Racine avec le vous avez créés vous-même, vous devrez également créer
répertoire <répertoire>. votre propre paire clé publique/clé secrète (voir le
manuel PGP). Vous devrez également configurer les macros
--target <plate-forme> suivantes :
Pendant la construction du paquetage, interpréter
<plate-forme> comme arch-vendor-os et fixer les
macros _target, _target_arch et _target_os en _signature
Le type de la signature. Actuellement, seule celle
de pgp est supportée. ftp://<utilisa-
teur>:<mot_de_passe>@nom_hôte:<port>/chemin/vers/paque-
_pgp_name tage.rpm
Le nom de l'"utilisateur" dont vous voulez utiliser
la clé pour signer vos paquetages. Si la partie :mot_de_passe est omise, le mot de passe sera
demandé (une seule fois par paire utilisateur/nom_hôte).
Si l'utilisateur et le mot de passe sont omis, le ftp
Pendant la construction de paquetages, vous ajouterez anonyme est utilisé. Dans tous les cas, des transferts
ensuite le signe -- à la ligne de commandes. On vous ftp passifs (PASV) sont utilisés.
demandera votre phrase de passe, et votre paquetage sera
construit et signé. RPM permet d'utiliser les options suivantes avec les URLs
ftp :
Par exemple, pour être capable d'utiliser PGP pour signer
les paquetages en tant qu'utilisateur "John Doe
<jdoe@foo.com>" à partir des key rings situées dans --ftpproxy <nom_hôte>
/etc/rpm/.pgp en utilisant l'exécutable /usr/bin/pgp, vous L'hôte <nom_hôte> sera utilisé comme un serveur
devriez inclure délégué (proxy) pour tous les transferts ftp, ce
qui permet aux utilisateurs d'effectuer des connex-
%_signature pgp ions au travers des gardes-barrière qui utilisent
des systèmes de proxies. Cette option peut égale-
%_pgp_path /etc/rpm/.pgp ment être spécifiée en configurant la macro _ftp-
proxy.
%_pgp_name John Doe <jdoe@foo.com>
OPTIONS DE RECONSTRUCTION DE LA BASE DE DONNEES RPM permet d'utiliser les options suivantes avec les URLs
La forme générale d'une commande de reconstruction d'une http :
base de données rpm est
--httpport <port>
Les seules options pour ces modes sont --dbchemin et Le port TCP numéro <port> à utiliser pour les con-
--root. nexions http sur le serveur proxy ftp au lieu du
port par défaut. Cette option peut également être
spécifiée en configurant la macro _httpport.
SHOWRC
Lancer
FICHIERS
rpm --showrc /usr/lib/rpm/rpmrc
/etc/rpmrc
~/.rpmrc
montrera les valeurs que va utiliser RPM pour toutes les /usr/lib/rpm/macros
options qui peuvent être fixées dans les fichiers rpmrc. /etc/rpm/macros
~/.rpmmacros
/var/lib/rpm/conflictsindex.rpm
OPTIONS FTP/HTTP /var/lib/rpm/fileindex.rpm
RPM inclut des simples clients FTP et HTTP pour simplifier /var/lib/rpm/groupindex.rpm
l'installation et l'interrogation de paquetages qui sont /var/lib/rpm/nameindex.rpm
disponibles sur internet. Les fichiers de paquetage pour /var/lib/rpm/packages.rpm
l'installation, la mise à niveau et les opérations /var/lib/rpm/providesindex.rpm
d'interrogation peuvent être spécifiés dans une URL du /var/lib/rpm/requiredby.rpm
style ftp ou http : /var/lib/rpm/triggerindex.rpm
/tmp/rpm*
!
découragée, et ses résultats ne sont pas toujours
VOIR AUSSI ce à quoi l'on s'attend.
glint(8) , rpm2cpio(8) , http://www.rpm.org/
-f Ne pas effectuer de fsck en cas de redémarrage.
AUTEURS
Marc Ewing <marc@redhat.com> -F Forcer l'utilisation de fsck en cas de redémarrage.
Jeff Johnson <jbj@redhat.com>
Erik Troan <ewt@redhat.com> -c Annuler un shutdown en cours. Avec cette option,
il n'est évidemment pas possible de donner l'argu-
TRADUCTION ment heure, mais vous pouvez entrer un message
Frédéric Delanoy, 2000. d'explication sur la ligne de commandes qui sera
envoyé à tous les utilisateurs.
BOGUES sort peut opérer suivant trois modes : tri (par défaut),
Pas vraiment un bogue, mais la plupart des utilisateurs regroupement, et vérification de l'ordre. Les options
oublient de donner l'argument heure et sont ensuite suivantes modifient le mode opératoire :
intrigués par le message d'erreur produit par shutdown.
L'argument heure est obligatoire; dans 90% des cas ce sera -c ([NDT] c = check - vérifier) Vérifie si les
le mot now. fichiers fournis sont déjà triés : s'ils ne le sont
pas, afficher un message d'erreur, et terminer avec
AUTEUR un code de retour valant 1.
Miquel van Smoorenburg, miquels@cistron.nl
-m ([NDT] m = merge - melanger) Regrouper les fichiers
VOIR AUSSI indiqués en les triant. Chaque fichier d'entrée
fsck(8), init(1), halt(8), reboot(8) doit déjà être trié individuellement. Il est tou-
jours possible de trier plutôt que de réunir, le
TRADUCTION regroupement est fourni parce qu'il est plus rapide
Frédéric Delanoy, 2000. dans les cas où il fonctionne.
- &
ajoute un automatiquement. Ceci signifie qu'avec l'entrée ` foo bar', sort
distingue deux champs ` foo' et ` bar'. Le
Si la variable d'environnement TMPDIR est configurée, sort séparateur n'appartient ni au champ précédent, ni
utilise ce répertoire pour stocker les fichiers tempo- au champ suivant.
raires à la place du répertoire par défaut /tmp. L'option
-T répertoire_temporaire permet également de sélectionner -u Pour l'action par défaut, ou pour l'action -m,
un répertoire pour placer les fichiers temporaires, elle a n'afficher que la première séquence de lignes con-
priorité sur la variable d'environnement. sidérées comme égales. Pour l'action -c, vérifier
qu'aucune lignes consécutives ne soient égales.
Les options suivantes affectent l'ordre des lignes de sor-
tie. Elles peuvent être mentionnées globalement, ou +POS1 [-POS2]
appliquées à un champ clé spécifique. Si aucun champ clé Indiquer un champ à utiliser comme clé de tri pour
n'est indiqué, les options globales s'appliquent aux com- chaque ligne. Le champ consiste en une portion de
paraisons des lignes entières, sinon elles sont transmises de ligne débutant à la position POS1, et s'étendant
aux champs clés n'ayant pas d'option spécifique. jusqu'à POS2 non-inclue (ou jusqu'à la fin de la
ligne si POS2 n'est pas mentionnée). Les positions
-b Ignorer les blancs en début de ligne pendant la des champs et des caractères sont numérotées à par-
recherche de la clé de tri sur chaque ligne. tir de 0.
Paramètres d'entrée:
( 0 ( 0
[-]ignbrk
Ignorer les signaux breaks.
NOM [-]brkint
stty - Modifier et afficher la configuration de la ligne Un break déclenche un signal d'interruption.
de terminal.
[-]ignpar
SYNOPSIS Ignorer les erreurs de parité.
stty [configuration...]
stty {-a,--all,-g,--help,--save,--version} [-]parmrk
Signaler les erreurs de parité par une séquence
DESCRIPTION 255-0-caractère.
Cette page de manuel documente la version GNU de stty.
[-]inpck
Si aucun argument n'est fourni, stty affiche la vitesse de Active la vérification de parité.
communication, le numéro de discipline de ligne (sur les
systèmes le supportant) et les éléments de configuration [-]istrip
modifiés par rapport aux valeurs fixées par `stty sane'. Effacer le bit de poids fort (8ième) des caractères
en entrée.
La configuration en question est celle de la ligne tty
connectée sur l'entrée standard. [-]inlcr
Traduire les Sauts-de-ligne (NewLine) en Retours-
stty accepte les arguments suivants, qui modifient le com- Chariots (Carriage Return).
portement de la ligne.
[-]igncr
Un `[-]' devant un argument signifie que l'on peut Ignorer les Retours-Chariot (Carriage Return).
l'inhiber en le faisant précéder d'un `-'. Certains argu-
ments ne sont pas disponibles sur tous les systèmes, car [-]icrnl
il s'agit d'extensions non-POSIX. Ils sont indiqués par Traduire les Retours-Chariots (Carriage Return) en
`(np)'. Sauts-de-ligne (NewLine).
Paramètres de controle : [-]ixon
Activer le controle de flux XON/XOFF.
[-]parenb [-]ixoff [-]tandem
Transmet un bit de parité en sortie, et en attend Activer l'émission d'un caractère d'arrêt lorsque
un en entrée. le buffer d'entrée est presque plein, et d'un car-
actère de redémarrage lorsqu'il est à nouveau vide
[-]parodd
Indique une parite impaire (paire si précéde de [-]iuclc (np)
`-'). Convertir les majuscules en minuscules.
cs5 cs6 cs7 cs8 [-]ixany (np)
Indique une taille de caractère de 5, 6, 7, ou 8 Permet l'utilisation de n'importe quel caractère
bits. pour redémarrer la sortie (si l'on utilise `-',
seul le caractère Start sera actif).
[-]hupcl [-]hup
Envoie un signal de déconnexion (Hangup) lorsque le [-]imaxbel (np)
dernier processus referme la ligne tty. Valider l'émission d'un signal sonore lorsqu'un
! !
caractère arrive alors que le buffer d'entrée est Valider les caractères spéciaux non-Posix.
plein, dans ce cas le buffer n'est pas purgé.
[-]echo
Paramètres de sortie : Activer l'écho des caractères saisis.
[-]echoe, [-]crterase
[-]opost Effectuer l'écho du caractère d'effacement sous
Postprocess output ([NDT] ???). forme BackSpace-Espace-BackSpace.
[-]raw Identique à -ignbrk -brkint -ignpar -parmrk -inpck susp Emission d'un signal Terminal Stop
-istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc
-ixany -imaxbel -opost -isig -icanon -xcase min 1 dsusp (np)
time 0. Avec `-', identique à cooked. Emission d'un signal Terminal Stop après avoir vidé
le buffer d'entrée.
[-]cbreak
Identique à -icanon. rprnt (np)
Réafficher la ligne en cours.
[-]pass8
Identique à -parenb -istrip cs8. avec `-', iden- werase (np)
tique à parenb istrip cs7. Effacement du dernier mot saisi.
rows N (np)
Les valeurs par défaut des caractères spéciaux varient Indique au noyau que le terminal dispose de N
suivant les systèmes. Ils sont configurés en utilisant la lignes.
syntaxe `nom valeur'. Les noms sont indiqués ci-dessous,
et les valeurs peuvent être fournies soit littéralement en cols N columns N (np)
utilisant la notation (`^c'), soit avec un entier commen- Indique au noyau que le terminal dispose de N
cant par `0x' pour une valeur héxadécimale, `0' pour une colonnes.
valeur octale, ou tout autre chiffre pour une valeur
décimale. Indiquer la valeur `^-' ou `undef' permet de size (np)
désactiver le caractère spécial. Affiche le nombre de lignes et de colonnes dont
dispose le terminal selon les informations fournies
par le noyau. Les systèmes ne permettant pas la
intr Envoie le signal Intr. configuration de rows et cols dans le noyau
utilisent généralement les variables d'environ-
quit Envoie le signal Quit. nement LINES et COLUMNS à la place. Toutefois, la
version GNU de stty ne les utilise pas.
erase Efface le dernier caractère saisi.
line N (np)
kill Efface la ligne en cours. Utiliser la discipline de ligne N.
eof Signale une fin de fichier (terminer la saisie). speed Affiche la vitesse du terminal.
OPTIONS
FSF 7 Janvier 1997 STTY(1L) -c COMMANDE, --command=COMMANDE
Transmet la COMMANDE (sur une seule ligne) au shell
avec l'option -c plutot que démarrer un shell
interactif.
(' (' -f, --fast
Transmet l'argument -f au shell. Ceci n'a proba-
blement de signification que pour csh et tcsh, pour
lesquels l'option -f évite la lecture du fichier de
NOM démarrage (.cshrc). Avec les shells de type Bourne,
su - Executer un shell avec un User-ID et un Group-ID l'option -f désactive le développement des motifs
différents. génériques dans les noms de fichiers, ce qui n'est
généralement pas le but recherché.
SYNOPSIS
su [-flmp] [-c commande] [-s shell] [--login] [--fast] --help Afficher un message d'aide sur la sortie standard
[--preserve-environment] [--command=commande] et terminer normalement.
[--shell=shell] [-] [--help] [--version] [utilisateur
[arg...]] -, -l, --login
Appelle le shell sous forme de shell de connexion.
DESCRIPTION Voici ce que cela signifie : Invalider toutes les
Cette page de manuel documente la version GNU de su. variables d'environnement sauf `TERM', `HOME', et
`SHELL' (qui sont renseignées comme décrit ci-
su permet à un utilisateur de se transformer temporaire- dessus), ainsi que `USER' et `LOGNAME' (qui sont
ment en un autre utilisateur. alors remplies même pour le Super-Utilisateur).
Remplir `PATH' avec une valeur par défaut donnée
Un shell est exécute avec les UID, GID effectifs et réels, lors de la compilation. Se déplacer dans le réper-
ainsi que les groupes supplémentaires de l'utilisateur toire HOME de l'utilisateur. Ajouter "-" au nom du
indiqué. shell, pour que celui-ci lise son ou ses fichiers
de démarrage.
Si aucun nom d'utilisateur n'est mentionné, le nom root,
le Super-Utilisateur, est utilisé par défaut. -m, -p, --preserve-environment
Ne pas changer les variables d'environnement
Le shell exécuté est celui mentionné dans l'enregistrement `HOME', `USER', `LOGNAME', et `SHELL'. Executer le
correspondant à l'utilisateur dans le fichier /etc/passwd. shell correspondant à la variable d'environnement
Si aucun shell n'y est indiqué, /bin/sh est exécuté par `SHELL' plutot que celui présent dans l'enreg-
défaut. istrement /etc/passwd de l'utilisateur, à moins que
ce dernier ait un shell restreint, et que
Si l'utilisateur dispose d'un mot de passe, su le réclame, l'appelant ne soit pas le Super-Utilisateur. Un
à moins qu'il n'ait été invoque avec un UID réel valant 0 shell est restreint s'il n'est pas dans la liste
!- !&
/etc/shells, ou dans une liste fournie lors de la
compilation si ce dernier fichier n'existe pas. Le AUTHOR
comportement de cette option peut être partielle- Written by Jim Meyering.
ment modifiée avec les options --login et --shell.
REPORTING BUGS
-s, --shell shell Report bugs to <bug-fileutils@gnu.org>.
Exécute le shell indiqué plutôt que celui présent
dans l'enregistrement /etc/passwd de l'utilisateur, COPYRIGHT
à moins que ce dernier ait un shell restreint, et Copyright (C) 2001 Free Software Foundation, Inc.
que l'appelant ne soit pas le Super-Utilisateur. This is free software; see the source for copying condi-
tions. There is NO warranty; not even for MERCHANTABILITY
--version or FITNESS FOR A PARTICULAR PURPOSE.
Afficher un numéro de version sur la sortie stan-
dard et terminer normalement. SEE ALSO
The full documentation for sync is maintained as a Texinfo
manual. If the info and sync programs are properly
Pourquoi GNU SU ne gère-t-il pas le groupe `wheel' (par Richard installed at your site, the command
Stallman)
Il peut arriver qu'un petit groupe d'utilisateurs essayent info sync
de s'approprier l'ensemble du système. Par exemple, en
1984, quelques utilisateurs du laboratoire d'I.A du MIT should give you access to the complete manual.
ont tentés de prendre le pouvoir en modifiant le mot de
passe de l'opérateur sur le système Twenex, et en gardant
ce mot de passe secret. (J'ai pu les en empêcher en modi-
fiant le noyau, et restaurer ainsi les autres accès, mais sync (fileutils) 4.1 April 2001 SYNC(1)
je ne saurais pas en faire autant sous Unix).
!0 *
an example of the anomalous behavior. behavior is the opposite of how older versions
behave, so you might have to turn this on.
The main configuration file /etc/syslog.conf or an alter-
native file, given with the -f option, is read at startup. -s domainlist
Any lines that begin with the hash mark (``#'') and empty Specify a domainname that should be stripped off
lines are ignored. If an error occurs during parsing the before logging. Multiple domains may be specified
whole line is ignored. using the colon (``:'') separator. Please be
advised that no sub-domains may be specified but
only entire domains. For example if -s north.de is
specified and the host logging resolves to
OPTIONS satu.infodrom.north.de no domain would be cut, you
-a socket will have to specify two domains like: -s
Using this argument you can specify additional north.de:infodrom.north.de.
sockets from that syslogd has to listen to. This
is needed if you're going to let some daemon run -v Print version and exit.
within a chroot() environment. You can use up to
19 additional sockets. If your environment needs -x Disable name lookups when receiving remote mes-
even more, you have to increase the symbol MAXFUNIX sages. This avoids deadlocks when the nameserver
within the syslogd.c source file. An example for a is running on the same machine that runs the syslog
chroot() daemon is described by the people from daemon.
OpenBSD at http://www.psionic.com/papers/dns.html.
This option is introduced in version 1.3 of the Under the new scheme this behavior remains the same. The
sysklogd package. Please note that the default difference is the addition of four new specifiers, the
asterisk (*) wildcard, the equation sign (=), the exclama- command line. The default behavior is that syslogd won't
tion mark (!), and the minus sign (-). listen to the network.
The * specifies that all messages for the specified facil- The strategy is to have syslogd listen on a unix domain
ity are to be directed to the destination. Note that this socket for locally generated log messages. This behavior
behavior is degenerate with specifying a priority level of will allow syslogd to inter-operate with the syslog found
debug. Users have indicated that the asterisk notation is in the standard C library. At the same time syslogd lis-
more intuitive. tens on the standard syslog port for messages forwarded
from other hosts. To have this work correctly the ser-
The = wildcard is used to restrict logging to the speci- vices(5) files (typically found in /etc) must have the
fied priority class. This allows, for example, routing following entry:
only debug messages to a particular logging source.
syslog 514/udp
For example the following line in syslog.conf would
direct debug messages from all sources to the If this entry is missing syslogd neither can receive
/usr/adm/debug file. remote messages nor send them, because the UDP port cant
be opened. Instead syslogd will die immediately, blowing
# Sample syslog.conf out an error message.
*.=debug /usr/adm/debug
To cause messages to be forwarded to another host replace
The ! is used to exclude logging of the specified priori- the normal file line in the syslog.conf file with the name
ties. This affects all (!) possibilities of specifying of the host to which the messages is to be sent prepended
priorities. with an @.
For example the following lines would log all mes- For example, to forward ALL messages to a remote
sages of the facility mail except those with the host use the following syslog.conf entry:
priority info to the /usr/adm/mail file. And all
messages from news.info (including) to news.crit # Sample syslogd configuration file to
(excluding) would be logged to the /usr/adm/news # messages to a remote host forward all.
file. *.* @hostname
SUPPORT FOR REMOTE LOGGING If the remote host is located in the same domain as the
These modifications provide network support to the syslogd host, syslogd is running on, only the simple hostname will
facility. Network support means that messages can be for- be logged instead of the whole fqdn.
warded from one node running syslogd to another node run-
ning syslogd where they will be actually logged to a disk In a local network you may provide a central log server to
file. have all the important information kept on one machine.
If the network consists of different domains you don't
To enable this you have to specify the -r option on the have to complain about logging fully qualified names
!
instead of simple hostnames. You may want to use the ets will of course expose a system to risks outside of
strip-domain feature -s of this server. You can tell the programs or individuals on the local machine.
syslogd to strip off several domains other than the one
the server is located in and only log simple hostnames. There are a number of methods of protecting a machine:
Using the -l option there's also a possibility to define 1. Implement kernel firewalling to limit which hosts
single hosts as local machines. This, too, results in or networks have access to the 514/UDP socket.
logging only their simple hostnames and not the fqdns.
2. Logging can be directed to an isolated or non-root
The UDP socket used to forward messages to remote hosts or filesystem which, if filled, will not impair the
to receive messages from them is only opened when it is machine.
needed. In releases prior to 1.3-23 it was opened every
time but not opened for reading or forwarding respec- 3. The ext2 filesystem can be used which can be con-
tively. figured to limit a certain percentage of a filesys-
tem to usage by root only. NOTE that this will
require syslogd to be run as a non-root process.
OUTPUT TO NAMED PIPES (FIFOs) ALSO NOTE that this will prevent usage of remote
This version of syslogd has support for logging output to logging since syslogd will be unable to bind to the
named pipes (fifos). A fifo or named pipe can be used as 514/UDP socket.
a destination for log messages by prepending a pipy symbol
(``|'') to the name of the file. This is handy for debug- 4. Disabling inet domain sockets will limit risk to
ging. Note that the fifo must be created with the mkfifo the local machine.
command before syslogd is started.
5. Use step 4 and if the problem persists and is not
The following configuration file routes debug mes- secondary to a rogue program/daemon get a 3.5 ft
sages from the kernel to a fifo: (approx. 1 meter) length of sucker rod* and have a
chat with the user in question.
# Sample configuration to route kernel debugging
# messages ONLY to /usr/adm/debug which is a Sucker rod def. -- 3/4, 7/8 or 1in. hardened steel
# named pipe. rod, male threaded on each end. Primary use in the
kern.=debug |/usr/adm/debug oil industry in Western North Dakota and other
locations to pump 'suck' oil from oil wells. Sec-
ondary uses are for the construction of cattle feed
INSTALLATION CONCERNS lots and for dealing with the occasional recalci-
There is probably one important consideration when trant or belligerent individual.
installing this version of syslogd. This version of sys-
logd is dependent on proper formatting of messages by the
syslog function. The functioning of the syslog function DEBUGGING
in the shared libraries changed somewhere in the region of When debugging is turned on using -d option then syslogd
libc.so.4.[2-4].n. The specific change was to null-termi- will be very verbose by writing much of what it does on
nate the message before transmitting it to the /dev/log stdout. Whenever the configuration file is reread and re-
socket. Proper functioning of this version of syslogd is parsed you'll see a tabular, corresponding to the internal
dependent on null-termination of the message. data structure. This tabular consists of four fields:
This problem will typically manifest itself if old stati- number This field contains a serial number starting by
cally linked binaries are being used on the system. Bina- zero. This number represents the position in the
ries using old versions of the syslog function will cause internal data structure (i.e. the array). If one
empty lines to be logged followed by the message with the number is left out then there might be an error in
first character in the message removed. Relinking these the corresponding line in /etc/syslog.conf.
binaries to newer versions of the shared libraries will
correct this problem. pattern
This field is tricky and represents the internal
Both the syslogd(8) and the klogd(8) can either be run structure exactly. Every column stands for a
from init(8) or started as part of the rc.* sequence. If facility (refer to syslog(3)). As you can see,
it is started from init the option -n must be set, other- there are still some facilities left free for for-
wise you'll get tons of syslog daemons started. This is mer use, only the left most are used. Every field
because init(8) depends on the process ID. in a column represents the priorities (refer to
syslog(3)).
SECURITY THREATS action This field describes the particular action that
There is the potential for the syslogd daemon to be used takes place whenever a message is received that
as a conduit for a denial of service attack. Thanks go to matches the pattern. Refer to the syslog.conf(5)
John Morrison (jmorriso@rflab.ee.ubc.ca) for alerting me manpage for all possible actions.
to this potential. A rogue program(mer) could very easily
flood the syslogd daemon with syslog messages resulting in arguments
the log files consuming all the remaining space on the This field shows additional arguments to the
filesystem. Activating logging over the inet domain sock- actions in the last field. For file-logging this
'
is the filename for the logfile; for user-logging
this is a list of users; for remote logging this is Version 1.3 12 October 1998 SYSKLOGD(8)
the hostname of the machine to log to; for console-
logging this is the used console; for tty-logging
this is the specified tty; wall has no additional
arguments.
FILES
/etc/syslog.conf
Configuration file for syslogd. See syslog.conf(5)
for exact information. NOM
/dev/log tail - Afficher la dernière partie d'un fichier.
The Unix domain socket to from where local syslog
messages are read. SYNOPSIS
/var/run/syslogd.pid tail [-c [+]N[bkm]] [-n [+]N] [-fqv] [--bytes=[+]N[bkm]]
The file containing the process id of syslogd. [--lines=[+]N] [--follow] [--quiet] [--silent] [--verbose]
[--help] [--version] [fichier...]
BUGS
If an error occurs in one line the whole rule is ignored. tail [{-,+}Nbcfklmqv] [fichier...]
m blocs de 1 Mo.
- &
] [ -Z, --compress, --uncompress ] [ -z, --gzip,
-f, --follow --ungzip ] [ --use-compress-program PROG ] [ --block-
Boucler indéfiniment, en essayant de lire de plus compress ] [ -[0-7][lmh] ]
en plus de caractères à la fin du fichier, celui-ci
devant grandir. Cette option est ignorée si la filename1 [ filename2, ... filenameN ]
lecture se fait depuis un tube (pipe). Si plusieurs
fichiers d'entrée sont indiqués tail affiche un en- directory1 [ directory2, ...directoryN ]
tête dès qu'un fichier est modifié, pour montrer
celui qui est imprimé. DESCRIPTION
Voici la pages de manuel de la version GNU de tar, un pro-
-l, -n N, --lines N gramme de gestion d'archive utilisé pour créer et restau-
Afficher N lignes. -l n'est reconnu que dans rer des fichiers à partir d'une archive connue sous le nom
l'ancien format d'options. tarfile. Un fichier tarfile peut être sur un lecteur de
bande, cependant il est possible de produire un fichier
-q, --quiet, --silent tarfile comme un fichier normal. Le première argument de
Ne jamais afficher l'en-tête avec le nom du fichier tar doit être obligatoirement une de ces lettres: Acdrtux,
suivis par n'importe quelles fonctions optionnelles. Les
-v, --verbose arguments finaux de tar sont les noms des fichiers ou des
Toujours afficher l'en-tête avec le nom du fichier répertoires qui doivent être archivés. L'utilisation d'un
nom de répertoire implique toujours que les sous-réper-
--help Afficher un message d'aide sur la sortie standard toires seront inclus dans l'archive.
et terminer normalement.
OPTIONS PRINCIPALES
--version Il faut obligatoirement utiliser l'une des options suiv-
Afficher un numéro de version sur la sortie stan- antes :
dard et terminer normalement.
-A, --catenate, --concatenate
ajouter des fichiers à une archive.
TRADUCTION
Christophe Blaess, 1997. -c, --create
créer une nouvelle archive.
--delete
supprimer des fichiers d'une archive. (à ne pas
utiliser avec les lecteurs de bandes!)
-r, --append
ajouter des fichiers à la fin d'une archive.
NOM
tar - la version GNU de l'utilitaire tar de gestion -t, --list
d'archives. liste le contenu d'une archive.
SYNOPSIS -u, --update
tar [ - ] A --catenate --concatenate | c --create | d ajoute seulement les fichiers qui sont plus récents
--diff --compare | r --append | t --list | u --update | x que ceux de l'archive.
-extract --get [ --atime-preserve ] [ -b, --block-size N ]
[ -B, --read-full-blocks ] [ -C, --directory DIR ] [ -x, --extract, --get
--checkpoint ] [ -f, --file [HOSTNAME:]F ] [ --force- restaure les fichiers contenus dans une archive.
local ] [ -F, --info-script F --new-volume-script F ] [
-G, --incremental ] [ -g, --listed-incremental F ] [ -h, AUTRES OPTIONS
--dereference ] [ -i, --ignore-zeros ] [ --ignore-failed- --atime-preserve
read ] [ -k, --keep-old-files ] [ -K, --starting-file F ] ne modifie pas les dates d'accés des fichiers de
[ -l, --one-file-system ] [ -L, --tape-length N ] [ -m, l'archive.
--modification-time ] [ -M, --multi-volume ] [ -N,
--after-date DATE, --newer DATE ] [ -o, --old-archive, -b, --block-size N
--portability ] [ -O, --to-stdout ] [ -p, --same-permis- impose des blocs de N*512 octets (par défaut N=20).
sions, --preserve-permissions ] [ -P, --absolute-paths ] [
--preserve ] [ -R, --record-number ] [ --remove-files -B, --read-full-blocks
] [ -s, --same-order, --preserve-order ] [ --same-owner ] reforme des blocs valides (pour lire les tubes
[ -S, --sparse ] [ -T, --files-from F ] [ --null ] [ 4.2BSD).
--totals ] [ -v, --verbose ] [ -V, --label NOM ] [
--version ] [ -w, --interactive, --confirmation ] [ -W, -C, --directory DIR
--verify ] [ --exclude FILE ] [ -X, --exclude-from FILE aller dans le répertoire DIR.
0 '*
restaure les fichiers vers la sortie standard.
--checkpoint
affiche les noms des répertoires durant la lecture -p, --same-permissions, --preserve-permissions
de l'archive. restaure toutes les informations de protection.
--force-local --preserve
le fichier archive est local même si son nom con- comme -p -s
tient un deux-points.
-R, --record-number
-F, --info-script F --new-volume-script F accompage chaque message du numéro d'enregistrement
lance un script à la fin de chaque bande (implique au sein de l'archive.
-M).
--remove-files
-G, --incremental efface les fichiers après les avoir ajoutés à
crée/liste/restaure les anciens formats GNU de l'archive.
backup par incrémentation.
-s, --same-order, --preserve-order
-g, --listed-incremental F la liste des fichiers à restaurer est triée dans
crée/liste/restaure les nouveaux formats GNU de l'ordre d'archivage.
backup par incrémentation.
--same-owner
-h, --dereference conserve les appartenances des fichiers restaurés.
ne pas archiver les liens symboliques, archiver les
fichiers vers lesquels ils pointent. -S, --sparse
traite efficacement les fichiers à trous.
-i, --ignore-zeros
ignorer, dans l'archive, les blocs de zéros, qui -T, --files-from F
correspondent normalement à EOF. obtenir la liste des fichiers à extraire ou à
archiver depuis le fichier F.
--ignore-failed-read
n'abandonne pas l'opération si un fichier est --null
illisible. lire les noms se terminant par des caractères nuls.
Désactive l'option -C.
-k, --keep-old-files
conserve les fichiers existants; ne les remplace --totals
pas par les fichiers présents dans l'archive. affiche la taille totale de l'archive créée avec
--create
-K, --starting-file F
commence par le fichier F dans l'archive. -v, --verbose
afficher la liste des fichiers traités.
-l, --one-file-system
reste dans le système de fichier local quand -V, --label NOM
l'archive est créée. créer une archive avec le nom de volume NAME.
--block-compress
% % (/ & *& &
stoppe la sortie des programmes de compression pour
les lecteurs de bandes. NAME
telnet - user interface to the TELNET protocol
-[0-7][lmh]
spécifie le lecteur et sa densité. SYNOPSIS
telnet [-8EFKLacdfrx] [-X authtype] [-b hostalias] [-e escapechar]
[-k realm] [-l user] [-n tracefile] [host [port]]
TRADUCTION
Jérome Signouret, 2000. DESCRIPTION
The telnet command is used to communicate with another host using the
TELNET protocol. If telnet is invoked without the host argument, it
enters command mode, indicated by its prompt (telnet>). In this mode, it
accepts and executes the commands listed below. If it is invoked with
Linux 2 Avril 2000 TAR(1) arguments, it performs an open command with those arguments.
' '!
-f If Kerberos V5 authentication is being used, the -f option allows of quit and intr).
the local credentials to be forwarded to the remote system.
While connected to a remote host, telnet command mode may be entered by
-k realm typing the telnet ``escape character'' (initially ``^]''). When in com-
If Kerberos authentication is being used, the -k option requests mand mode, the normal terminal editing conventions are available. Note
that telnet obtain tickets for the remote host in realm realm that the escape character will return to the command mode of the initial
instead of the remote host's realm, as determined by invocation of telnet that has the controlling terminal. Use the send
krb_realmofhost(3). escape command to switch to command mode in subsequent telnet processes
on remote hosts.
-l user
When connecting to the remote system, if the remote system under- The following telnet commands are available. Only enough of each command
stands the ENVIRON option, then user will be sent to the remote to uniquely identify it need be typed (this is also true for arguments to
system as the value for the variable USER. This option implies the mode, set, toggle, unset, slc, environ, and display commands).
the -a option. This option may also be used with the open com-
mand. auth argument [...]
The auth command manipulates the information sent through the
-n tracefile TELNET AUTHENTICATE option. Valid arguments for the auth com-
Opens tracefile for recording trace information. See the set mand are as follows:
tracefile command below.
disable type Disables the specified type of authentication.
-r Specifies a user interface similar to rlogin(1). In this mode, To obtain a list of available types, use the
the escape character is set to the tilde (~) character, unless auth disable ? command.
modified by the -e option.
enable type Enables the specified type of authentication.
-x Turns on encryption of the data stream if possible. To obtain a list of available types, use the
auth enable ? command.
host Indicates the official name, an alias, or the Internet address of
a remote host. status Lists the current status of the various types of
authentication.
port Indicates a port number (address of an application). If a number
is not specified, the default telnet port is used. close Close a TELNET session and return to command mode.
When in rlogin mode, a line of the form ~. disconnects from the remote display argument [...]
host; ~ is the telnet escape character. Similarly, the line ~^Z suspends Displays all, or some, of the set and toggle values (see
the telnet session. The line ~^] escapes to the normal telnet escape below).
prompt.
encrypt argument [...]
Once a connection has been opened, telnet will attempt to enable the The encrypt command manipulates the information sent through
TELNET LINEMODE option. If this fails, telnet will revert to one of two the TELNET ENCRYPT option.
input modes: either ``character at a time'' or ``old line by line''
depending on what the remote system supports. Valid arguments for the encrypt command are as follows:
When LINEMODE is enabled, character processing is done on the local sys- disable type [input|output]
tem, under the control of the remote system. When input editing or char- Disables the specified type of encryption. If
acter echoing is to be disabled, the remote system will relay that infor- you omit input and output, both input and output
mation. The remote system will also relay changes to any special charac- are disabled. To obtain a list of available
ters that happen on the remote system, so that they can take effect on types, use the encrypt disable ? command.
the local system.
enable type [input|output]
In ``character at a time'' mode, most text typed is immediately sent to Enables the specified type of encryption. If
the remote host for processing. you omit input and output, both input and output
are enabled. To obtain a list of available
In ``old line by line'' mode, all text is echoed locally, and (normally) types, use the encrypt enable ? command.
only completed lines are sent to the remote host. The ``local echo char-
acter'' (initially ``^E'') may be used to turn off and on the local echo input This is the same as the encrypt start input com-
(this would mostly be used to enter passwords without the password being mand.
echoed).
-input This is the same as the encrypt stop input com-
If the LINEMODE option is enabled, or if the localchars toggle is TRUE mand.
(the default for ``old line by line''; see below), the user's quit, intr,
and flush characters are trapped locally, and sent as TELNET protocol output This is the same as the encrypt start output
sequences to the remote side. If LINEMODE has ever been enabled, then command.
the user's susp and eof are also sent as TELNET protocol sequences, and
quit is sent as a TELNET ABORT instead of BREAK. There are options (see -output This is the same as the encrypt stop output com-
toggle autoflush and toggle autosynch below) which cause this action to mand.
flush subsequent output to the terminal (until the remote host acknowl-
edges the TELNET sequence) and flush previous terminal input (in the case start [input|output]
' ''
Attempts to start encryption. If you omit input remote side does not understand the LINEMODE
and output, both input and output are enabled. option, then enter ``character at a time'' mode.
To obtain a list of available types, use the
encrypt enable ? command. line Enable the TELNET LINEMODE option, or, if the
remote side does not understand the LINEMODE
status Lists the current status of encryption. option, then attempt to enter ``old-line-by-
line'' mode.
stop [input|output]
Stops encryption. If you omit input and output, isig (-isig) Attempt to enable (disable) the TRAPSIG mode of
encryption is on both input and output. the LINEMODE option. This requires that the
LINEMODE option be enabled.
type type Sets the default type of encryption to be used
with later encrypt start or encrypt stop com- edit (-edit) Attempt to enable (disable) the EDIT mode of the
mands. LINEMODE option. This requires that the
LINEMODE option be enabled.
environ arguments [...]
The environ command is used to manipulate the variables that softtabs (-softtabs)
may be sent through the TELNET ENVIRON option. The initial Attempt to enable (disable) the SOFT_TAB mode of
set of variables is taken from the users environment, with the LINEMODE option. This requires that the
only the DISPLAY and PRINTER variables being exported by LINEMODE option be enabled.
default. The USER variable is also exported if the -a or -l
options are used. litecho (-litecho)
Valid arguments for the environ command are: Attempt to enable (disable) the LIT_ECHO mode of
the LINEMODE option. This requires that the
define variable value LINEMODE option be enabled.
Define the variable variable to have a value of
value. Any variables defined by this command are ? Prints out help information for the mode com-
automatically exported. The value may be enclosed mand.
in single or double quotes so that tabs and spaces
may be included. open host [-l user] [[-] port]
Open a connection to the named host. If no port number is
undefine variable specified, telnet will attempt to contact a TELNET server at
Remove variable from the list of environment vari- the default port. The host specification may be either a host
ables. name (see hosts(5)) or an Internet address specified in the
``dot notation'' (see inet(3)). The -l option may be used to
export variable specify the user name to be passed to the remote system via
Mark the variable variable to be exported to the the ENVIRON option. When connecting to a non-standard port,
remote side. telnet omits any automatic initiation of TELNET options. When
the port number is preceded by a minus sign, the initial
unexport variable option negotiation is done. After establishing a connection,
Mark the variable variable to not be exported the file .telnetrc in the user's home directory is opened.
unless explicitly asked for by the remote side. Lines beginning with a ``#'' are comment lines. Blank lines
are ignored. Lines that begin without whitespace are the
list List the current set of environment variables. start of a machine entry. The first thing on the line is the
Those marked with a * will be sent automatically, name of the machine that is being connected to. The rest of
other variables will only be sent if explicitly the line, and successive lines that begin with whitespace are
requested. assumed to be telnet commands and are processed as if they had
been typed in manually to the telnet command prompt.
? Prints out help information for the environ com-
mand. quit Close any open TELNET session and exit telnet. An end-of-file
(in command mode) will also close a session and exit.
logout Sends the TELNET LOGOUT option to the remote side. This com-
mand is similar to a close command; however, if the remote send arguments
side does not support the LOGOUT option, nothing happens. If, Sends one or more special character sequences to the remote
however, the remote side does support the LOGOUT option, this host. The following are the arguments which may be specified
command should cause the remote side to close the TELNET con- (more than one argument may be specified at a time):
nection. If the remote side also supports the concept of sus-
pending a user's session for later reattachment, the logout abort Sends the TELNET ABORT (Abort processes) sequence.
argument indicates that you should terminate the session imme-
diately. ao Sends the TELNET AO (Abort Output) sequence, which
should cause the remote system to flush all output
mode type type is one of several options, depending on the state of the from the remote system to the user's terminal.
TELNET session. The remote host is asked for permission to go
into the requested mode. If the remote host is capable of ayt Sends the TELNET AYT (Are You There) sequence, to
entering that mode, the requested mode will be entered. which the remote system may or may not choose to
respond.
character Disable the TELNET LINEMODE option, or, if the
'- '&
brk Sends the TELNET BRK (Break) sequence, which may have
significance to the remote system. ? Prints out help information for the send command.
ec Sends the TELNET EC (Erase Character) sequence, which set argument value
should cause the remote system to erase the last char-
acter entered. unset argument value
The set command will set any one of a number of telnet vari-
el Sends the TELNET EL (Erase Line) sequence, which ables to a specific value or to TRUE. The special value off
should cause the remote system to erase the line cur- turns off the function associated with the variable; this is
rently being entered. equivalent to using the unset command. The unset command will
disable or set to FALSE any of the specified functions. The
eof Sends the TELNET EOF (End Of File) sequence. values of variables may be interrogated with the display com-
mand. The variables which may be set or unset, but not tog-
eor Sends the TELNET EOR (End of Record) sequence. gled, are listed here. In addition, any of the variables for
the toggle command may be explicitly set or unset using the
escape Sends the current telnet escape character (initially set and unset commands.
``^]'').
ayt If TELNET is in localchars mode, or LINEMODE is
ga Sends the TELNET GA (Go Ahead) sequence, which likely enabled, and the status character is typed, a TELNET
has no significance to the remote system. AYT sequence (see send ayt preceding) is sent to the
remote host. The initial value for the "Are You
getstatus There" character is the terminal's status character.
If the remote side supports the TELNET STATUS command,
getstatus will send the subnegotiation to request that echo This is the value (initially ``^E'') which, when in
the server send its current option status. ``line by line'' mode, toggles between doing local
echoing of entered characters (for normal processing),
ip Sends the TELNET IP (Interrupt Process) sequence, and suppressing echoing of entered characters (for
which should cause the remote system to abort the cur- entering, say, a password).
rently running process.
eof If telnet is operating in LINEMODE or ``old line by
nop Sends the TELNET NOP (No OPeration) sequence. line'' mode, entering this character as the first
character on a line will cause this character to be
susp Sends the TELNET SUSP (SUSPend process) sequence. sent to the remote system. The initial value of the
eof character is taken to be the terminal's eof char-
synch Sends the TELNET SYNCH sequence. This sequence causes acter.
the remote system to discard all previously typed (but
not yet read) input. This sequence is sent as TCP erase If telnet is in localchars mode (see toggle localchars
urgent data (and may not work if the remote system is below), and if telnet is operating in ``character at a
a 4.2BSD system -- if it doesn't work, a lower case time'' mode, then when this character is typed, a
``r'' may be echoed on the terminal). TELNET EC sequence (see send ec above) is sent to the
remote system. The initial value for the erase char-
do cmd Sends the TELNET DO cmd sequence. cmd can be either a acter is taken to be the terminal's erase character.
decimal number between 0 and 255, or a symbolic name
for a specific TELNET command. cmd can also be either escape This is the telnet escape character (initially ``^['')
help or ? to print out help information, including a which causes entry into telnet command mode (when con-
list of known symbolic names. nected to a remote system).
kill If telnet is in localchars mode (see toggle localchars skey sequence challenge
below), and if telnet is operating in ``character at a The skey command computes a response to the S/Key challenge.
time'' mode, then when this character is typed, a See skey(1) for more information on the S/Key system.
TELNET EL sequence (see send el above) is sent to the
remote system. The initial value for the kill charac- slc state The slc command (Set Local Characters) is used to set or
ter is taken to be the terminal's kill character. change the state of the special characters when the TELNET
LINEMODE option has been enabled. Special characters are
lnext If telnet is operating in LINEMODE or ``old line by characters that get mapped to TELNET commands sequences (like
line'' mode, then this character is taken to be the ip or quit) or line editing characters (like erase and kill).
terminal's lnext character. The initial value for the By default, the local special characters are exported.
lnext character is taken to be the terminal's lnext
character. check Verify the current settings for the current spe-
cial characters. The remote side is requested to
quit If telnet is in localchars mode (see toggle localchars send all the current special character settings,
below) and the quit character is typed, a TELNET BRK and if there are any discrepancies with the local
sequence (see send brk above) is sent to the remote side, the local side will switch to the remote
host. The initial value for the quit character is value.
taken to be the terminal's quit character.
export Switch to the local defaults for the special char-
reprint acters. The local default characters are those of
If telnet is operating in LINEMODE or old line by the local terminal at the time when telnet was
line'' mode, then this character is taken to be the started.
terminal's reprint character. The initial value for
the reprint character is taken to be the terminal's import Switch to the remote defaults for the special
reprint character. characters. The remote default characters are
those of the remote system at the time when the
rlogin This is the rlogin escape character. If set, the nor- TELNET connection was established.
mal TELNET escape character is ignored unless it is
preceded by this character at the beginning of a line. ? Prints out help information for the slc command.
This character, at the beginning of a line, followed
by a "." closes the connection; when followed by a ^Z status Show the current status of telnet. This includes the peer one
it suspends the telnet command. The initial state is is connected to, as well as the current mode.
to disable the rlogin escape character.
toggle arguments [...]
start If the TELNET TOGGLE-FLOW-CONTROL option has been Toggle (between TRUE and FALSE) various flags that control how
enabled, then this character is taken to be the termi- telnet responds to events. These flags may be set explicitly
nal's start character. The initial value for the to TRUE or FALSE using the set and unset commands listed
start character is taken to be the terminal's start above. More than one argument may be specified. The state of
character. these flags may be interrogated with the display command.
Valid arguments are:
stop If the TELNET TOGGLE-FLOW-CONTROL option has been
enabled, then this character is taken to be the termi- authdebug Turns on debugging information for the authenti-
nal's stop character. The initial value for the stop cation code.
character is taken to be the terminal's stop charac-
ter. autoflush If autoflush and localchars are both TRUE, then
when the ao or quit characters are recognized
susp If telnet is in localchars mode, or LINEMODE is (and transformed into TELNET sequences; see set
enabled, and the suspend character is typed, a TELNET above for details), telnet refuses to display
SUSP sequence (see send susp above) is sent to the any data on the user's terminal until the remote
remote host. The initial value for the suspend char- system acknowledges (via a TELNET TIMING MARK
acter is taken to be the terminal's suspend character. option) that it has processed those TELNET
sequences. The initial value for this toggle is
tracefile TRUE if the terminal user had not done an "stty
This is the file to which the output, caused by noflsh", otherwise FALSE (see stty(1)).
netdata or option tracing being TRUE, will be written.
If it is set to ``-'', then tracing information will autodecrypt When the TELNET ENCRYPT option is negotiated, by
be written to standard output (the default). default the actual encryption (decryption) of
the data stream does not start automatically.
worderase The autoencrypt (autodecrypt) command states
If telnet is operating in LINEMODE or ``old line by that encryption of the output (input) stream
line'' mode, then this character is taken to be the should be enabled as soon as possible.
terminal's worderase character. The initial value for
the worderase character is taken to be the terminal's autologin If the remote side supports the TELNET
worderase character. AUTHENTICATION option TELNET attempts to use it
to perform automatic authentication. If the
- -
AUTHENTICATION option is not supported, the tocol processing (having to do with TELNET
user's login name are propagated through the options). The initial value for this toggle is
TELNET ENVIRON option. This command is the same FALSE.
as specifying a option on the open command.
prettydump When the netdata toggle is enabled, if
autosynch If autosynch and localchars are both TRUE, then prettydump is enabled the output from the
when either the intr or quit character is typed netdata command will be formatted in a more user
(see set above for descriptions of the intr and readable format. Spaces are put between each
quit characters), the resulting TELNET sequence character in the output, and the beginning of
sent is followed by the TELNET SYNCH sequence. any TELNET escape sequence is preceded by a '*'
This procedure should cause the remote system to to aid in locating them.
begin throwing away all previously typed input
until both of the TELNET sequences have been skiprc When the skiprc toggle is TRUE, TELNET skips the
read and acted upon. The initial value of this reading of the .telnetrc file in the user's home
toggle is FALSE. directory when connections are opened. The ini-
tial value for this toggle is FALSE.
binary Enable or disable the TELNET BINARY option on
both input and output. termdata Toggles the display of all terminal data (in
hexadecimal format). The initial value for this
inbinary Enable or disable the TELNET BINARY option on toggle is FALSE.
input.
verbose_encrypt
outbinary Enable or disable the TELNET BINARY option on When the verbose_encrypt toggle is TRUE, telnet
output. prints out a message each time encryption is
enabled or disabled. The initial value for this
crlf If this is TRUE, then carriage returns will be toggle is FALSE.
sent as <CR><LF>. If this is FALSE, then car-
riage returns will be send as <CR><NUL>. The ? Displays the legal toggle commands.
initial value for this toggle is FALSE.
z Suspend telnet. This command only works when the user is
crmod Toggle carriage return mode. When this mode is using the csh(1).
enabled, most carriage return characters
received from the remote host will be mapped ! [command]
into a carriage return followed by a line feed. Execute a single command in a subshell on the local system.
This mode does not affect those characters typed If command is omitted, then an interactive subshell is
by the user, only those received from the remote invoked.
host. This mode is not very useful unless the
remote host only sends carriage return, but ? [command]
never line feeds. The initial value for this Get help. With no arguments, telnet prints a help summary.
toggle is FALSE. If a command is specified, telnet will print the help informa-
tion for just that command.
debug Toggles socket level debugging (useful only to
the superuser). The initial value for this tog- ENVIRONMENT
gle is FALSE. telnet uses at least the HOME, SHELL, DISPLAY, and TERM environment vari-
ables. Other environment variables may be propagated to the other side
encdebug Turns on debugging information for the encryp- via the TELNET ENVIRON option.
tion code.
FILES
localchars If this is TRUE, then the flush, interrupt, ~/.telnetrc user customized telnet startup values
quit, erase, and kill characters (see set above)
are recognized locally, and transformed into HISTORY
(hopefully) appropriate TELNET control sequences The telnet command appeared in 4.2BSD.
(respectively ao, ip, brk, ec, and el; see send
above). The initial value for this toggle is NOTES
TRUE in ``old line by line'' mode, and FALSE in On some remote systems, echo has to be turned off manually when in ``old
``character at a time'' mode. When the LINEMODE line by line'' mode.
option is enabled, the value of localchars is
ignored, and assumed to always be TRUE. If In ``old line by line'' mode or LINEMODE the terminal's eof character is
LINEMODE has ever been enabled, then quit is only recognized (and sent to the remote system) when it is the first
sent as abort, and eof and suspend are sent as character on a line.
eof and susp (see send above).
Source routing is not supported yet for IPv6.
netdata Toggles the display of all network data (in hex-
adecimal format). The initial value for this BSD February 3, 1994 BSD
toggle is FALSE.
- -'
D Size of pages marked dirty. mands, and the status of secure and cumulative modes.
LC Last used processor. (That this changes from time to k Kill a process. You will be prompted for the PID of
time is not a bug; Linux intentionally uses weak the task, and the signal to send to it. For a normal
affinity. Also notice that the very act of running kill, send signal 15. For a sure, but rather abrupt,
top may break weak affinity and cause more processes kill, send signal 9. The default signal, as with
to change current CPU more often because of the extra kill(1), is 15, SIGTERM. This command is not avail-
demand for CPU time.) able in secure mode.
RSS The total amount of physical memory used by the task, i Ignore idle and zombie processes. This is a toggle
in kilobytes, is shown here. For ELF processes used switch.
library pages are counted here, for a.out processes
not. I Toggle between Solaris (CPU percentage divided by
total number of CPUs) and Irix (CPU percentage calcu-
SHARE lated solely by amount of time) views. This is a
The amount of shared memory used by the task is shown toggle switch that affects only SMP systems.
in this column.
n or #
STAT The state of the task is shown here. The state is Change the number of processes to show. You will be
either S for sleeping, D for uninterruptible sleep, R prompted to enter the number. This overrides auto-
for running, Z for zombies, or T for stopped or matic determination of the number of processes to
traced. These states are modified by trailing < for a show, which is based on window size measurement. If
process with negative nice value, N for a process 0 is specified, then top will show as many processes
with positive nice value, W for a swapped out process as will fit on the screen; this is the default.
(this does not work correctly for kernel processes).
q Quit.
WCHAN
depending on the availablity of either r Re-nice a process. You will be prompted for the PID
/boot/psdatabase or the kernel link map /boot/Sys- of the task, and the value to nice it to. Entering a
tem.map this shows the address or the name of the positve value will cause a process to be niced to
kernel function the task currently is sleeping in. negative values, and lose priority. If root is run-
ning top, a negative value can be entered, causing a
TIME Total CPU time the task has used since it started. process to get a higher than normal priority. The
If cumulative mode is on, this also includes the CPU default renice value is 10. This command is not
time used by the process's children which have died. available in secure mode.
You can set cumulative mode with the S command line
option or toggle it with the interactive command S. S This toggles cumulative mode, the equivalent of ps
The header line will then be changed to CTIME. -S, i.e., that CPU times will include a process's
defunct children. For some programs, such as compil-
%CPU The task's share of the CPU time since the last ers, which work by forking into many seperate tasks,
screen update, expressed as a percentage of total CPU normal mode will make them appear less demanding than
time per processor. they actually are. For others, however, such as
shells and init, this behavior is correct. In any
%MEM The task's share of the physical memory. case, try cumulative mode for an alternative view of
CPU use.
COMMAND
The task's command name, which will be truncated if s Change the delay between updates. You will be
it is too long to be displayed on one line. Tasks in prompted to enter the delay time, in seconds, between
memory will have a full command line, but swapped-out updates. Fractional values are recognized down to
tasks will only have the name of the program in microseconds. Entering 0 causes continuous updates.
parentheses (for example, "(getty)"). The default value is 5 seconds. Note that low values
cause nearly unreadably fast displays, and greatly
A , WP raise the load. This command is not available in
these fields from the kmem top are not supported. secure mode.
INTERACTIVE COMMANDS f or F
Several single-key commands are recognized while top is Add fields to display or remove fields from the dis-
running. Some are disabled if the s option has been given play. See below for more information.
on the command line.
o or O
space Change order of displayed fields. See below for more
Immediately updates the display. information.
^L Erases and redraws the screen. l toggle display of load average and uptime
information.
h or ?
Displays a help screen giving a brief summary of com- m toggle display of memory information.
-- -&
of time between updates. For the first update, a short
t toggle display of processes and CPU states informa- delay is used, and top itself dominates the CPU usage.
tion. After that, top will drop back, and a more reliable esti-
mate of CPU usage is available.
c toggle display of command name or full command line.
The SIZE and RSS fields don't count the page tables and
N sort tasks by pid (numerically). the task_struct of a process; this is at least 12K of mem-
ory that is always resident. SIZE is the virtual size of
A sort tasks by age (newest first). the process (code+data+stack).
P sort tasks by CPU usage (default). Keep in mind that a process must die for its time to be
recorded on its parent by cumulative mode. Perhaps more
M sort tasks by resident memory usage. useful behavior would be to follow each process upwards,
adding time, but that would be more expensive, possibly
T sort tasks by time / cumulative time. prohibitively so. In any case, that would make top's
behavior incompatible with ps.
W Write current setup to ~/.toprc. This is the recom-
mended way to write a top configuration file. FILES
/etc/toprc The global configuration file. ~/.toprc The
The Field and Order Screens personal configuration file.
After pressing f, F, o or O you will be shown a screen
specifying the field order on the top line and short SEE ALSO
descriptions of the field contents. The field order string ps(1), free(1), uptime(1), kill(1), renice(1).
uses the following syntax: If the letter in the filed
string corresponding to a field is upper case, the field BUGS
will be displayed. This is furthermore indicated by an If the window is less than about 70x7, top will not format
asterisk in front of the field description. The order of information correctly.
the fields corresponds to the order of the letters in the Many fields still have problems with ELF processes.
string. the help screens are not yet optimized for windows with
From the field select screen you can toggle the display less than 25 lines
of a field by pressing the corresponding letter.
From the order screen you may move a field to the left by AUTHOR
pressing the corresponding upper case letter resp. to the top was originally written by Roger Binns, based on Branko
right by pressing the lower case one. Lankester's <lankeste@fwi.uva.nl> ps program. Robert
Nation <nation@rocket.sanders.lockheed.com> re-wrote it
Configuration Files significantly to use the proc filesystem, based on Michael
Top reads it's default configuration from two files, K. Johnson's <johnsonm@redhat.com> proc-based ps program.
/etc/toprc and ~/.toprc. The global configuration file Michael Shields <mjshield@nyx.cs.du.edu> made many
may be used to restrict the usage of top to the secure changes, including secure and cumulative modes and a gen-
mode for non-priviledged users. If this is desired, the eral cleanup. Tim Janik <timj@gtk.org> added age sorting
file should contain a 's' to specify secure mode and a and the ability to monitor specific processes through
digit d (2<=d<=9) for the default delay (in seconds) on a their ids.
single line. The personal configuration file contains two
lines. The first line contains lower and upper letters to Helmut Geyer <Helmut.Geyer@iwr.uni-heidelberg.de> Heavily
specify which fields in what order are to be displayed. changed it to include support for configurable fields and
The letters correspond to the letters in the Fields or other new options, and did further cleanup and use of the
Order screens from top. As this is not very instructive, new readproc interface.
it is recommended to select fields and order in a running
top process and to save this using the W interactive com- The "b" and "n" options contributed by George Bonser
mand. The second line is more interesting (and impor- <george@captech.com> for CapTech IT Services.
tant). It contains information on the other options. Most
important, if you have saved a configuration in secure Michael K. Johnson <johnsonm@redhat.com> is now the main-
mode, you will not get an insecure top without removing tainer.
the lower 's' from the second line of your ~/.toprc. A
digit specifies the delay time between updates, a capital Please send bug reports to <procps-bugs@redhat.com>
'S' cumulative mode, a lower 'i' no-idle mode, a capital
'I' Irix view. As in interactive mode, a lower 'm', 'l',
and 't' suppresses the display of memory, uptime resp.
process and CPU state information. Currently changing the Linux Feb 1 1993 TOP(1)
default sorting order (by CPU usage) is not supported.
NOTES
0 0
This proc-based top works by reading the files in the proc
filesystem, mounted on /proc. If /proc is not mounted,
top will not work.
NOM
%CPU shows the cputime/realtime percentage in the period tty - Afficher le nom du terminal associe à l'entrée stan-
-0 &*
dard. -n, --nodename
Afficher le nom d'hôte de la machine sur le réseau.
SYNOPSIS
tty [-s] [--silent] [--quiet] [--help] [--version] -r, --release
Afficher le numéro de version du système
DESCRIPTION d'exploitation.
Cette page de manuel documente la version GNU de tty.
-s, --sysname
tty affiche le nom de fichier du tty associé à son entrée Afficher le nom du système d'exploitation.
standard. Il affiche `not a tty' si l'entrée standard
n'est pas un terminal. -v Afficher la version du système d'exploitation.
TRADUCTION
Christophe Blaess, 1997.
' # %# ' # %#
SYNOPSIS
updatedb [-u] [-u path] [-e path1,path2,...] [-f
NOM fstype1,...] [-l [01] ] [-q] [-v,--verbose] [-V, --ver-
uname - Afficher des informations sur le système. sion] [-h, --help] pattern...
SYNOPSIS DESCRIPTION
uname [-snrvma] [--sysname] [--nodename] [--release] This manual page documents slocate, a security-enhanced
[--machine] [--all] [--help] [--version] version of locate. updatedb is simply a link to slocate
that implies the -u option.
DESCRIPTION
Cette page de manuel documente la version GNU de uname. OPTIONS
-u Create slocate database starting at the root direc-
uname affiche des informations concernant la machine et le tory. This is the default behavior when called as
système d'exploitation sur lequel il est invoqué. updatedb.
OPTIONS -f fstypes
-m, --machine Exclude file systems in the comma-separated list
Afficher le type (matériel) de machine. dirs from the slocate database.
& &
-l <num> The date on which the user account will be dis-
Security level. -l 0 turns security checks off, abled. The date is specified in the format YYYY-
which will make searches faster. -l 1 turns secu- MM-DD.
rity checks on. This is the default.
-f inactive_days
-q Quiet mode; error messages are suppressed. The number of days after a password expires until
the account is permanently disabled. A value of 0
-v Verbose mode; display files indexed when creating disables the account as soon as the password has
database expired, and a value of -1 disables the feature.
The default value is -1.
--help Print a summary of the options to slocate and exit.
-g initial_group
--version The group name or number of the user's initial
Print the version number of slocate and exit. login group. The group name must exist. A group
number must refer to an already existing group.
ENVIRONMENT The default group number is 1.
SEE ALSO
locate(1L), -G group,[...]
A list of supplementary groups which the user is
also a member of. Each group is separated from the
next by a comma, with no intervening whitespace.
UPDATEDB(1L) The groups are subject to the same restrictions as
the group given with the -g option. The default is
for the user to belong only to the initial group.
'(% ## " '(% ## " -m The user's home directory will be created if it
does not exist. The files contained in skele-
ton_dir will be copied to the home directory if the
-k option is used, otherwise the files contained in
/etc/skel will be used instead. Any directories
NAME contained in skeleton_dir or /etc/skel will be cre-
useradd - Create a new user or update default new user ated in the user's home directory as well. The -k
information option is only valid in conjunction with the -m
option. The default is to not create the directory
SYNOPSIS and to not copy any files.
useradd [-c comment] [-d home_dir]
[-e expire_date] [-f inactive_time] -M The user home directory will not be created, even
[-g initial_group] [-G group[,...]] if the system wide settings from /etc/login.defs is
[-m [-k skeleton_dir] | -M] [-p passwd] to create home dirs.
[-s shell] [-u uid [ -o]] [-n] [-r] login
-n A group having the same name as the user being
useradd -D [-g default_group] [-b default_home] added to the system will be created by default.
[-f default_inactive] [-e default_expire_date] This option will turn off this Red Hat Linux spe-
[-s default_shell] cific behavior.
DESCRIPTION -r This flag is used to create a system account. That
Creating New Users is, an user with an UID lower than value of UID_MIN
When invoked without the -D option, the useradd command defined in /etc/login.defs. Note that useradd will
creates a new user account using the values specified on not create a home directory for such an user,
the command line and the default values from the system. regardless of the default setting in
The new user account will be entered into the system files /etc/login.defs. You have to specify -m option if
as needed, the home directory will be created, and initial you want a home directory for a system account to
files copied, depending on the command line options. The be created. This is an option added by Red Hat.
version provided with Red Hat Linux will create a group
for each user added to the system, unless -n option is -p passwd
given. The options which apply to the useradd command are The encrypted password, as returned by crypt(3).
The default is to disable the account.
-c comment
The new user's password file comment field. -s shell
The name of the user's login shell. The default is
-d home_dir to leave this field blank, which causes the system
The new user will be created using home_dir as the to select the default login shell.
value for the user's login directory. The default
is to append the login name to default_home and use -u uid The numerical value of the user's ID. This value
that as the login directory name. must be unique, unless the -o option is used. The
value must be non-negative. The default is to use
-e expire_date the smallest ID value greater than 99 and greater
& &!
than every other user. Values between 0 and 99 are '(% #% " '(% #% "
typically reserved for system accounts.
-b default_home SYNOPSIS
The initial path prefix for a new user's home userdel [-r] login
directory. The user's name will be affixed to the
end of default_home to create the new directory DESCRIPTION
name if the -d option is not used when creating a The userdel command modifies the system account files,
new account. deleting all entries that refer to login. The named user
must exist.
-e default_expire_date
The date on which the user account is disabled. -r Files in the user's home directory will be removed
along with the home directory itself and the user's
-f default_inactive mail spool. Files located in other file systems
The number of days after a password has expired will have to be searched for and deleted manually.
before the account will be disabled.
FILES
-g default_group /etc/passwd - user account information
The group name or ID for a new user's initial /etc/shadow - secure user account information
group. The named group must exist, and a numerical /etc/group - group information
group ID must have an existing entry .
CAVEATS
-s default_shell userdel will not allow you to remove an account if the
The name of the new user's login shell. The named user is currently logged in. You must kill any running
program will be used for all future new user processes which belong to an account that you are delet-
accounts. ing. You may not remove any NIS attributes on an NIS
client. This must be performed on the NIS server.
If no options are specified, useradd displays the current
default values. SEE ALSO
chfn(1), chsh(1), groupadd(8), groupdel(8), groupmod(8),
NOTES passwd(1), useradd(8), usermod(8)
The system administrator is responsible for placing the
default user files in the /etc/skel directory. AUTHOR
This version of useradd was modified by Red Hat to suit Julianne Frances Haugh (jfh@austin.ibm.com)
Red Hat user/group conventions.
CAVEATS
You may not add a user to an NIS group. This must be per- USERDEL(8)
formed on the NIS server.
FILES $ ' $
/etc/passwd - user account information
/etc/shadow - secure user account information
/etc/group - group information
/etc/gshadow - secure group information NAME
/etc/default/useradd - default information w - Show who is logged on and what they are doing.
/etc/login.defs - system-wide settings
/etc/skel - directory containing default files SYNOPSIS
w - [husfV] [user]
SEE ALSO
chfn(1), chsh(1), crypt(3), groupadd(8), groupdel(8), DESCRIPTION
groupmod(8), passwd(1), userdel(8), usermod(8) w displays information about the users currently on the
machine, and their processes. The header shows, in this
AUTHOR order, the current time, how long the system has been
Julianne Frances Haugh (jfh@austin.ibm.com) running, how many users are currently logged on, and the
system load averages for the past 1, 5, and 15 minutes.
& &'
The JCPU time is the time used by all processes attached
to the tty. It does not include past background jobs, but Le message peut être fourni en tant qu'argument sur la
does include currently running background jobs. ligne de commande, ou il peut être envoyé dans l'entrée
standard de wall. Quant l'entrée standard est un termi-
The PCPU time is the time used by the current process, nal, le message doit se terminer par la touche EOF (la
named in the "what" field. plupart du temps Controle-D).
VOIR AUSSI
mesg(1).
COMMAND-LINE OPTIONS
-h Don't print the header. AUTHOR
Miquel van Smoorenburg, miquels@drinkel.ow.org
-u Ignores the username while figuring out the current
process and cpu times. To demonstrate this, do a
"su" and do a "w" and a "w -u". TRADUCTION
Christophe Blaess, 1997.
-s Use the short format. Don't print the login time,
JCPU or PCPU times.
-f Toggle printing the from (remote hostname) field. Linux 16 Avril 1997 WALL(1)
The default as released is for the from field to not
be printed, although your system administrator or
distribution maintainer may have compiled a version
in which the from field is shown by default. $ ' $
-V Display version information.
NOTE
Note that command is given to "sh -c" which means that you
may need to use extra quoting to get the desired effect.
$ $
Note that POSIX option processing is used (i.e., option
processing stops at the first non-option argument). This
means that flags after command don't get interpreted by
NOM watch itself.
wall -- Envoyer un message sur les terminaux de tout les
utilisateurs. EXAMPLES
To watch for mail, you might do
SYNOPSIS
wall [ message ] watch -n 60 from
&- &&
fichier, précédée du nom du fichier s'il a été indiqué en
If you're only interested in files owned by user joe, you argument.
might use
Si plusieurs fichiers sont mentionnés, wc ajoute une ligne
watch -d 'ls -l | fgrep joe' finale de statistiques, contenant le cumul des valeurs,
précédé du nom `total'. Les statistiques sont affichées
To see the effects of quoting, try these out dans l'ordre suivant : nombre de lignes, de mots, et
d'octets.
watch echo $$
Par défaut wc affiche les trois valeurs. Les options per-
watch echo '$$' mettent de n'en afficher que certaines d'entre elles. Les
options ne se surchargent pas, mais cumulent leurs effets,
watch echo "'"'$$'"'" ainsi wc --bytes --words affiche à la fois le nombre
d'octets et de mots.
You can watch for your administrator to install the latest
kernel with OPTIONS
-c, --bytes, --chars
watch uname -r Afficher uniquement le nombre d'octets.
$ $ $ $
NOM NOM
wc - Afficher le nombre d'octets, de mots et de lignes who - Montrer qui est connecté.
d'un fichier.
SYNOPSIS
SYNOPSIS who [-imqsuwHT] [--count] [--idle] [--heading] [--help]
wc [-clw] [--bytes] [--chars] [--lines] [--words] [--help] [--message] [--mesg] [--version] [--writable] [fichier]
[--version] [fichier...] [am i]
DESCRIPTION DESCRIPTION
Cette page de manuel documente la version GNU de wc ([NDT] Cette page de manuel documente la version GNU de who.
wc = Word Count).
Si aucun argument n'est fourni, hormis d'éventuelles
wc compte le nombre d'octets, de mots séparés par des options, who affiche les informations suivantes pour
blancs, et de sauts de lignes (NewLines) dans chacun des chaque utilisateur connecté :
fichiers indiqués.
nom de connexion
Si aucun fichier n'est fourni, ou si le nom `-' est men- terminal
tionné, la lecture se fait depuis l'entrée standard. heure de connexion
nom d'hote distant, ou numéro de terminal X
Une ligne de statistiques est affichée pour chaque
&0 0*
Si un argument est fourni qui ne soit pas une option, who $ % 1 *+ & & $ %
l'utilise à la place de /etc/utmp comme nom de fichier
contenant les enregistrements des connexions. /etc/wtmp
est souvent utilisé comme argument lors de l'appel de who
pour voir qui s'est connecté précédemment.
NOM
Si deux arguments ne représentant pas des options sont write - Envoyer un message à un autre utilisateur.
fournis, who affiche seulement les informations concernant
l'utilisateur qui l'a invoqué (ceci étant déterminé grâce SYNOPSIS
à son entrée standard), précédé du nom d'hôte. Tradition- write utilisateur [nom_terminal]
nellement, les deux arguments sont `am i', comme dans `who
am i'. ([NDT] Mais ca marche aussi tres bien avec `who DESCRIPTION
suis je' ;-) Write vous permet de communiquer avec d'autres utilisa-
teurs, en copiant des lignes de votre terminal sur le
OPTIONS leur.
-m Identique `who am i'.
Quand vous exécutez la commande write , l'utilisateur à
-q, --count qui vous écrivez reçoit un message de la forme :
Affiche uniquement les noms d'utilisateurs et le
nombres de personnes connectées. Ceci a priorité Message de votrenom@votremachine sur votreterminal
sur toutes les autres options. à hh:mm ...
-s Sans effet - uniquement pour assurer la compati- Toutes les lignes suivantes que vous entrerez seront
bilité avec d'autres versions de who. copiées sur le terminal de l'utilisateur spécifié. Si
l'autre utilisateur veut répondre, il doit également
-i, -u, --idle lancer write.
Après l'heure de connexion, affiche le nombre
d'heures et de minutes d'inactivité (idle) de Quand vous avez terminé, entrez un caractère de fin de
l'utilisateur. `.' signifie que l'utilisateur a fichier (EOF) ou bien un caractère d'interruption.
été actif durant la dernière minute. `old' signi- L'autre utilisateur verra le message EOF qui indique que
fie que l'utilisateur a été inactif pendant plus de la conversation est terminée.
24 heures.
Vous pouvez empêcher quiconque (à l'exception du
-H, --heading super-utilisateur) d'écrire sur votre terminal en util-
Afficher une ligne de libellé pour les colonnes. isant la commande mesg(1). Certaines commandes, par exem-
ple nroff(1) et pr(1), peuvent désactiver automatiquement
-w, -T, --mesg, --message, --writable l'écriture sur votre terminal, de sorte que leur sortie ne
Comme -s, mais ajoute après le nom de connexion un soit pas écrasée.
caractère indiquant le statut de l'utilisateur vis
à vis des messages : Si l'utilisateur que vous voulez joindre est connecté sur
plus d'un terminal, vous pouvez spécifier sur quel termi-
+ les messages émis par write sont autorisés nal écrire en spécifiant le nom du terminal comme second
argument à la commande write. Sinon, vous pouvez laisser
- les messages émis par write ne sont pas write sélectionner un des terminaux ; il prendra celui en
autorisés activité depuis le moins longtemps, pour que si l'utilisa-
teur est connecté au travail et s'est connecté ensuite à
? impossible de trouver le périphérique du la maison, le message ira au bon endroit (à la maison).
terminal
L'arrangement traditionnel utilisé pour écrire à quelqu'un
--help Afficher un message d'aide sur la sortie standard est que quand la chaîne de caractères "-o" est placée dans
et terminer normalement. ou à la fin d'une ligne, c'est au tour de l'autre personne
à parler. La chaîne de caractères "oo" signifie que la
--version personne concernée croit que la conversation est terminée.
Afficher un numéro de version sur la sortie stan-
dard et terminer normalement. VOIR AUSSI
mesg(1), talk(1), who(1)
TRADUCTION HISTORIQUE
Christophe Blaess, 1997. Une commande write est apparue dans la version 6 de UNIX
AT&T.
TRADUCTION
FSF 9 Janvier 1997 WHO(1L) Frédéric Delanoy, 2000.
0 0
play server and related utilities, Xserver, rgb, mkfont-
Linux 7 Août 2000 WRITE(1) dir; remote execution utilities, rstart and xon; a clip-
board manager, xclipboard; keyboard description compiler
and related utilities, xkbcomp, xkbprint, xkbbell, xkbevd,
xkbvleds, and xkbwatch; a utility to terminate clients,
.2 .! "3 .2 xkill; an optimized X protocol proxy, lbxproxy; a firewall
security proxy, xfwp; a proxy manager to control them,
proxymngr; a utility to find proxies, xfindproxy; Netscape
Navigator Plug-ins, libxrx.so and libxrxnest.so; an RX
MIME-type helper program, xrx; and a utility to cause part
NAME or all of the screen to be redrawn, xrefresh.
X - a portable, network-transparent window system
Many other utilities, window managers, games, toolkits,
SYNOPSIS etc. are included as user-contributed software in the X
The X Window System is a network transparent window system Consortium distribution, or are available using anonymous
which runs on a wide range of computing and graphics ftp on the Internet. See your site administrator for
machines. It should be relatively straightforward to details.
build the X Consortium software distribution on most ANSI
C and POSIX compliant systems. Commercial implementations STARTING UP
are also available for a wide range of platforms. There are two main ways of getting the X server and an
initial set of client applications started. The particu-
The X Consortium requests that the following names be used lar method used depends on what operating system you are
when referring to this software: running and whether or not you use other window systems in
addition to X.
X
X Window System xdm (the X Display Manager)
X Version 11 If you want to always have X running on your dis-
X Window System, Version 11 play, your site administrator can set your machine
X11 up to use the X Display Manager xdm. This program
is typically started by the system at boot time
X Window System is a trademark of X Consortium, Inc. and takes care of keeping the server running and
getting users logged in. If you are running xdm,
DESCRIPTION you will see a window on the screen welcoming you
X Window System servers run on computers with bitmap dis- to the system and asking for your username and
plays. The server distributes user input to and accepts password. Simply type them in as you would at a
output requests from various client programs through a normal terminal, pressing the Return key after
variety of different interprocess communication channels. each. If you make a mistake, xdm will display an
Although the most common case is for the client programs error message and ask you to try again. After you
to be running on the same machine as the server, clients have successfully logged in, xdm will start up
can be run transparently from other machines (including your X environment. By default, if you have an
machines with different architectures and operating sys- executable file named .xsession in your home
tems) as well. directory, xdm will treat it as a program (or
shell script) to run to start up your initial
X supports overlapping hierarchical subwindows and text clients (such as terminal emulators, clocks, a
and graphics operations, on both monochrome and color dis- window manager, user settings for things like the
plays. For a full explanation of the functions that are background, the speed of the pointer, etc.). Your
available, see the Xlib - C Language X Interface manual, site administrator can provide details.
the X Window System Protocol specification, the X Toolkit
Intrinsics - C Language Interface manual, and various xinit (run manually from the shell)
toolkit documents. Sites that support more than one window system
might choose to use the xinit program for starting
The number of programs that use X is quite large. Pro- X manually. If this is true for your machine,
grams provided in the core X Consortium distribution your site administrator will probably have pro-
include: a terminal emulator, xterm; a window manager, vided a program named "x11", "startx", or "xstart"
twm; a display manager, xdm; a console redirect program, that will do site-specific initialization (such as
xconsole; a mail interface, xmh; a bitmap editor, bitmap; loading convenient default resources, running a
resource listing/manipulation tools, appres, editres; window manager, displaying a clock, and starting
access control programs, xauth, xhost, and iceauth; user several terminal emulators) in a nice way. If
preference setting programs, xrdb, xcmsdb, xset, xsetroot, not, you can build such a script using the xinit
xstdcmap, and xmodmap; clocks, xclock and oclock; a font program. This utility simply runs one user-speci-
displayer, (xfd; utilities for listing information about fied program to start the server, runs another to
fonts, windows, and displays, xlsfonts, xwininfo, start up any desired clients, and then waits for
xlsclients, xdpyinfo, xlsatoms, and xprop; screen image either to finish. Since either or both of the
manipulation utilities, xwd, xwud, and xmag; a performance user-specified programs may be a shell script,
measurement utility, x11perf; a font compiler, bdftopcf; a this gives substantial flexibility at the expense
font server and related utilities, xfs, fsinfo, fslsfonts, of a nice interface. For this reason, xinit is
fstobdf; an X Image Extension exerciser, xieperf; a dis- not intended for end users.
0 0!
tacting a given server, The hostname part of the display
DISPLAY NAMES name is used to determine the type of channel (also called
From the user's perspective, every X server has a display a transport layer) to be used. X servers generally
name of the form: support the following types of connections:
hostname:displaynumber.screennumber local
The hostname part of the display name should be
This information is used by the application to determine the empty string. For example: :0, :1, and :0.1.
how it should connect to the server and which screen it The most efficient local transport will be chosen.
should use by default (on displays with multiple moni-
tors): TCPIP
The hostname part of the display name should be
hostname the server machine's IP address name. Full Inter-
The hostname specifies the name of the machine to net names, abbreviated names, and IP addresses are
which the display is physically connected. If the all allowed. For example: x.org:0, expo:0,
hostname is not given, the most efficient way of 198.112.45.11:0, bigmachine:1, and hydra:0.1.
communicating to a server on the same machine will
be used. DECnet
The hostname part of the display name should be
displaynumber the server machine's nodename, followed by two
The phrase "display" is usually used to refer to colons instead of one. For example: myws::0,
collection of monitors that share a common key- big::1, and hydra::0.1.
board and pointer (mouse, tablet, etc.). Most
workstations tend to only have one keyboard, and
therefore, only one display. Larger, multi-user ACCESS CONTROL
systems, however, frequently have several displays An X server can use several types of access control.
so that more than one person can be doing graphics Mechanisms provided in Release 6 are:
work at once. To avoid confusion, each display on Host Access Simple host-based access control.
a machine is assigned a display number (beginning MIT-MAGIC-COOKIE-1 Shared plain-text "cookies".
at 0) when the X server for that display is XDM-AUTHORIZATION-1 Secure DES based private-keys.
started. The display number must always be given SUN-DES-1 Based on Sun's secure rpc system.
in a display name. MIT-KERBEROS-5 Kerberos Version 5 user-to-user.
screennumber Xdm initializes access control for the server and also
Some displays share a single keyboard and pointer places authorization information in a file accessible to
among two or more monitors. Since each monitor the user. Normally, the list of hosts from which connec-
has its own set of windows, each screen is tions are always accepted should be empty, so that only
assigned a screen number (beginning at 0) when the clients with are explicitly authorized can connect to the
X server for that display is started. If the display. When you add entries to the host list (with
screen number is not given, screen 0 will be used. xhost), the server no longer performs any authorization on
connections from those machines. Be careful with this.
On POSIX systems, the default display name is stored in
your DISPLAY environment variable. This variable is set The file from which Xlib extracts authorization data can
automatically by the xterm terminal emulator. However, be specified with the environment variable XAUTHORITY, and
when you log into another machine on a network, you will defaults to the file .Xauthority in the home directory.
need to set DISPLAY by hand to point to your display. For Xdm uses $HOME/.Xauthority and will create it or merge in
example, authorization records if it already exists when a user
logs in.
% setenv DISPLAY myws:0
$ DISPLAY=myws:0; export DISPLAY If you use several machines and share a common home direc-
The xon script can be used to start an X program on a tory across all of the machines by means of a network file
remote machine; it automatically sets the DISPLAY variable system, you never really have to worry about authorization
correctly. files, the system should work correctly by default. Oth-
erwise, as the authorization files are machine-indepen-
Finally, most X programs accept a command line option of dent, you can simply copy the files to share them. To
-display displayname to temporarily override the contents manage authorization files, use xauth. This program
of DISPLAY. This is most commonly used to pop windows on allows you to extract records and insert them into other
another person's screen or as part of a "remote shell" files. Using this, you can send authorization to remote
command to start an xterm pointing back to your display. machines when you login, if the remote machine does not
For example, share a common home directory with your local machine.
Note that authorization information transmitted ``in the
% xeyes -display joesws:0 -geometry 1000x1000+0+0 clear'' through a network file system or using ftp or rcp
% rsh big xterm -display myws:0 -ls </dev/null & can be ``stolen'' by a network eavesdropper, and as such
may enable unauthorized access. In many environments,
X servers listen for connections on a variety of different this level of security is not a concern, but if it is, you
communications channels (network byte streams, shared mem- need to know the exact semantics of the particular autho-
ory, etc.). Since there can be more than one way of con- rization data to know if this is actually a problem.
0 0'
For more information on access control, see the Xsecurity xterm -fn 6x10 -geometry 80x24+30+200 &
manual page. xclock -geometry 48x48-0+0 &
xload -geometry 48x48-96+0 &
GEOMETRY SPECIFICATIONS xbiff -geometry 48x48-48+0 &
One of the advantages of using window systems instead of
hardwired terminals is that applications don't have to be
restricted to a particular size or location on the screen. WINDOW MANAGERS
Although the layout of windows on a display is controlled The layout of windows on the screen is controlled by spe-
by the window manager that the user is running (described cial programs called window managers. Although many win-
below), most X programs accept a command line argument of dow managers will honor geometry specifications as given,
the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH, others may choose to ignore them (requiring the user to
HEIGHT, XOFF, and YOFF are numbers) for specifying a pre- explicitly draw the window's region on the screen with the
ferred size and location for this application's main win- pointer, for example).
dow.
Since window managers are regular (albeit complex) client
The WIDTH and HEIGHT parts of the geometry specification programs, a variety of different user interfaces can be
are usually measured in either pixels or characters, built. The X Consortium distribution comes with a window
depending on the application. The XOFF and YOFF parts are manager named twm which supports overlapping windows,
measured in pixels and are used to specify the distance of popup menus, point-and-click or click-to-type input mod-
the window from the left or right and top and bottom edges els, title bars, nice icons (and an icon manager for those
of the screen, respectively. Both types of offsets are who don't like separate icon windows).
measured from the indicated edge of the screen to the cor-
responding edge of the window. The X offset may be speci- See the user-contributed software in the X Consortium dis-
fied in the following ways: tribution for other popular window managers.
+XOFF The left edge of the window is to be placed XOFF FONT NAMES
pixels in from the left edge of the screen (i.e., Collections of characters for displaying text and symbols
the X coordinate of the window's origin will be in X are known as fonts. A font typically contains images
XOFF). XOFF may be negative, in which case the that share a common appearance and look nice together (for
window's left edge will be off the screen. example, a single size, boldness, slant, and character
set). Similarly, collections of fonts that are based on a
-XOFF The right edge of the window is to be placed XOFF common type face (the variations are usually called roman,
pixels in from the right edge of the screen. XOFF bold, italic, bold italic, oblique, and bold oblique) are
may be negative, in which case the window's right called families.
edge will be off the screen.
Fonts come in various sizes. The X server supports scal-
The Y offset has similar meanings: able fonts, meaning it is possible to create a font of
arbitrary size from a single source for the font. The
+YOFF The top edge of the window is to be YOFF pixels server supports scaling from outline fonts and bitmap
below the top edge of the screen (i.e., the Y fonts. Scaling from outline fonts usually produces sig-
coordinate of the window's origin will be YOFF). nificantly better results than scaling from bitmap fonts.
YOFF may be negative, in which case the window's
top edge will be off the screen. An X server can obtain fonts from individual files stored
in directories in the file system, or from one or more
-YOFF The bottom edge of the window is to be YOFF pixels font servers, or from a mixtures of directories and font
above the bottom edge of the screen. YOFF may be servers. The list of places the server looks when trying
negative, in which case the window's bottom edge to find a font is controlled by its font path. Although
will be off the screen. most installations will choose to have the server start up
with all of the commonly used font directories in the font
Offsets must be given as pairs; in other words, in order path, the font path can be changed at any time with the
to specify either XOFF or YOFF both must be present. Win- xset program. However, it is important to remember that
dows can be placed in the four corners of the screen using the directory names are on the server's machine, not on
the following specifications: the application's.
+0+0 upper left hand corner. Bitmap font files are usually created by compiling a tex-
tual font description into binary form, using bdftopcf.
-0+0 upper right hand corner. Font databases are created by running the mkfontdir pro-
gram in the directory containing the source or compiled
-0-0 lower right hand corner. versions of the fonts. Whenever fonts are added to a
directory, mkfontdir should be rerun so that the server
+0-0 lower left hand corner. can find the new fonts. To make the server reread the
font database, reset the font path with the xset program.
In the following examples, a terminal emulator is placed For example, to add a font to a private directory, the
in roughly the center of the screen and a load average following commands could be used:
monitor, mailbox, and clock are placed in the upper right
hand corner: % cp newfont.pcf ~/myfonts
0- 0&
% mkfontdir ~/myfonts ning. The objname is a normal, case-insensitive DECnet
% xset fp rehash object name. The cataloguelist specifies a list of cata-
logue names, with '+' as a separator.
The xfontsel and xlsfonts programs can be used to browse
through the fonts available on a server. Font names tend Examples: DECnet/SRVNOD::FONT$DEFAULT, dec-
to be fairly long as they contain all of the information net/44.70::font$special/symbols.
needed to uniquely identify individual fonts. However,
the X server supports wildcarding of font names, so the COLOR NAMES
full specification Most applications provide ways of tailoring (usually
through resources or command line arguments) the colors of
-adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1 various elements in the text and graphics they display. A
color can be specified either by an abstract color name,
might be abbreviated as: or by a numerical color specification. The numerical
specification can identify a color in either device-depen-
-*-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1 dent (RGB) or device-independent terms. Color strings are
case-insensitive.
Because the shell also has special meanings for * and ?,
wildcarded font names should be quoted: X supports the use of abstract color names, for example,
"red", "blue". A value for this abstract name is obtained
% xlsfonts -fn '-*-courier-medium-r-normal--*-100-*-*-*-*-*-*' by searching one or more color name databases. Xlib first
searches zero or more client-side databases; the number,
The xlsfonts program can be used to list all of the fonts location, and content of these databases is implementation
that match a given pattern. With no arguments, it lists dependent. If the name is not found, the color is looked
all available fonts. This will usually list the same font up in the X server's database. The text form of this
at many different sizes. To see just the base scalable database is commonly stored in the file
font names, try using one of the following patterns: <XRoot>/lib/X11/rgb.txt, where <XRoot> is replaced by the
root of the X11 install tree.
-*-*-*-*-*-*-0-0-0-0-*-0-*-*
-*-*-*-*-*-*-0-0-75-75-*-0-*-* A numerical color specification consists of a color space
-*-*-*-*-*-*-0-0-100-100-*-0-*-* name and a set of values in the following syntax:
Examples: tcp/x.org:7100, tcp/198.112.45.11:7100/all. For backward compatibility, an older syntax for RGB Device
is supported, but its continued use is not encouraged.
One of the following forms can be used to name a font The syntax is an initial sharp sign character followed by
server that accepts DECnet connections: a numeric specification, in one of the following formats:
* *
-fg color, -foreground color
Either option specifies the color to use for text RESOURCES
or graphics. To make the tailoring of applications to personal prefer-
ences easier, X provides a mechanism for storing default
-fn font, -font font values for program resources (e.g. background color, win-
Either option specifies the font to use for dis- dow title, etc.) Resources are specified as strings that
playing text. are read in from various places when an application is
run. Program components are named in a hierarchical fash-
-iconic ion, with each node in the hierarchy identified by a class
This option indicates that the user would prefer and an instance name. At the top level is the class and
that the application's windows initially not be instance name of the application itself. By convention,
visible as if the windows had be immediately the class name of the application is the same as the pro-
iconified by the user. Window managers may choose gram name, but with the first letter capitalized (e.g.
not to honor the application's request. Bitmap or Emacs) although some programs that begin with
the letter ``x'' also capitalize the second letter for
-name historical reasons.
This option specifies the name under which
resources for the application should be found. The precise syntax for resources is:
This option is useful in shell aliases to distin-
guish between invocations of an application, with- ResourceLine = Comment | IncludeFile | ResourceSpec | <empty line>
out resorting to creating links to alter the exe- Comment = "!" {<any character except null or newline>}
cutable file name. IncludeFile = "#" WhiteSpace "include" WhiteSpace FileName WhiteSpace
FileName = <valid filename for operating system>
-rv, -reverse ResourceSpec = WhiteSpace ResourceName WhiteSpace ":" WhiteSpace Value
Either option indicates that the program should ResourceName = [Binding] {Component Binding} ComponentName
simulate reverse video if possible, often by swap- Binding = "." | "*"
ping the foreground and background colors. Not WhiteSpace = {<space> | <horizontal tab>}
all programs honor this or implement it correctly. Component = "?" | ComponentName
It is usually only used on monochrome displays. ComponentName = NameChar {NameChar}
NameChar = "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-"
+rv Value = {<any character except null or unescaped newline>}
This option indicates that the program should not
simulate reverse video. This is used to override Elements separated by vertical bar (|) are alternatives.
any defaults since reverse video doesn't always Curly braces ({...}) indicate zero or more repetitions of
work properly. the enclosed elements. Square brackets ([...]) indicate
that the enclosed element is optional. Quotes ("...") are
-selectionTimeout used around literal characters.
This option specifies the timeout in milliseconds
within which two communicating applications must IncludeFile lines are interpreted by replacing the line
respond to one another for a selection request. with the contents of the specified file. The word
"include" must be in lowercase. The filename is inter-
-synchronous preted relative to the directory of the file in which the
This option indicates that requests to the X line occurs (for example, if the filename contains no
server should be sent synchronously, instead of directory or contains a relative directory specification).
asynchronously. Since Xlib normally buffers
requests to the server, errors do not necessarily If a ResourceName contains a contiguous sequence of two or
get reported immediately after they occur. This more Binding characters, the sequence will be replaced
option turns off the buffering so that the appli- with single "." character if the sequence contains only
cation can be debugged. It should never be used "." characters, otherwise the sequence will be replaced
with a working program. with a single "*" character.
-title string A resource database never contains more than one entry for
This option specifies the title to be used for a given ResourceName. If a resource file contains multi-
this window. This information is sometimes used ple lines with the same ResourceName, the last line in the
by a window manager to provide some sort of header file is used.
identifying the window.
Any whitespace character before or after the name or colon
-xnllanguage language[_territory][.codeset] in a ResourceSpec are ignored. To allow a Value to begin
This option specifies the language, territory, and with whitespace, the two-character sequence ``\space''
codeset for use in resolving resource and other (backslash followed by space) is recognized and replaced
filenames. by a space character, and the two-character sequence
``\tab'' (backslash followed by horizontal tab) is recog-
-xrm resourcestring nized and replaced by a horizontal tab character. To
This option specifies a resource name and value to allow a Value to contain embedded newline characters, the
override any defaults. It is also very useful for two-character sequence ``\n'' is recognized and replaced
setting resources that don't have explicit command by a newline character. To allow a Value to be broken
line arguments. across multiple lines in a text file, the two-character
* *!
sequence ``\newline'' (backslash followed by newline) is xrdb program will sort resources automatically and
recognized and removed from the value. To allow a Value place them in RESOURCE_MANAGER or
to contain arbitrary character codes, the four-character SCREEN_RESOURCES, as appropriate.
sequence ``\nnn'', where each n is a digit character in
the range of ``0''-``7'', is recognized and replaced with application-specific files
a single byte that contains the octal value specified by Directories named by the environment variable
the sequence. Finally, the two-character sequence ``\\'' XUSERFILESEARCHPATH or the environment variable
is recognized and replaced with a single backslash. XAPPLRESDIR (which names a single directory and
should end with a '/' on POSIX systems), plus
When an application looks for the value of a resource, it directories in a standard place (usually under
specifies a complete path in the hierarchy, with both <XRoot>/lib/X11/, but this can be overridden with
class and instance names. However, resource values are the XFILESEARCHPATH environment variable) are
usually given with only partially specified names and searched for for application-specific resources.
classes, using pattern matching constructs. An asterisk For example, application default resources are
(*) is a loose binding and is used to represent any number usually kept in <XRoot>/lib/X11/app-defaults/.
of intervening components, including none. A period (.) See the X Toolkit Intrinsics - C Language Inter-
is a tight binding and is used to separate immediately face manual for details.
adjacent components. A question mark (?) is used to match
any single component name or class. A database entry can- XENVIRONMENT
not end in a loose binding; the final component (which Any user- and machine-specific resources may be
cannot be "?") must be specified. The lookup algorithm specified by setting the XENVIRONMENT environment
searches the resource database for the entry that most variable to the name of a resource file to be
closely matches (is most specific for) the full name and loaded by all applications. If this variable is
class being queried. When more than one database entry not defined, a file named $HOME/.Xdefaults-host-
matches the full name and class, precedence rules are used name is looked for instead, where hostname is the
to select just one. name of the host where the application is execut-
ing.
The full name and class are scanned from left to right
(from highest level in the hierarchy to lowest), one com- -xrm resourcestring
ponent at a time. At each level, the corresponding compo- Resources can also be specified from the command
nent and/or binding of each matching entry is determined, line. The resourcestring is a single resource
and these matching components and bindings are compared name and value as shown above. Note that if the
according to precedence rules. Each of the rules is string contains characters interpreted by the
applied at each level, before moving to the next level, shell (e.g., asterisk), they must be quoted. Any
until a rule selects a single entry over all others. The number of -xrm arguments may be given on the com-
rules (in order of precedence) are: mand line.
1. An entry that contains a matching component (whether Program resources are organized into groups called
name, class, or "?") takes precedence over entries classes, so that collections of individual resources (each
that elide the level (that is, entries that match the of which are called instances) can be set all at once. By
level in a loose binding). convention, the instance name of a resource begins with a
lowercase letter and class name with an upper case letter.
2. An entry with a matching name takes precedence over Multiple word resources are concatenated with the first
both entries with a matching class and entries that letter of the succeeding words capitalized. Applications
match using "?". An entry with a matching class written with the X Toolkit Intrinsics will have at least
takes precedence over entries that match using "?". the following resources:
SCREEN_RESOURCES root window property Most applications using the X Toolkit Intrinsics also have
Any resources specific to a given screen (e.g. the resource foreground (class Foreground), specifying the
colors) that should be available to clients on all color to use for text and graphics within the window.
machines should be stored in the SCREEN_RESOURCES
property on the root window of that screen. The By combining class and instance specifications, applica-
* *'
tion preferences can be set quickly and easily. Users of See locale(7x), setlocale(3), locale(1).
color displays will frequently want to set Background and
Foreground classes to particular defaults. Specific color XMODIFIERS
instances such as text cursors can then be overridden This variable can be set to contain additional
without having to define all of the related resources. information important for the current locale set-
For example, ting. Typically set to @im=<input-method> to enable
a particular input method. See XSetLocaleModi-
bitmap*Dashed: off fiers(3).
XTerm*cursorColor: gold
XTerm*multiScroll: on XLOCALEDIR
XTerm*jumpScroll: on This must point to a directory containing the
XTerm*reverseWrap: on locale.alias file and Compose and XLC_LOCALE file
XTerm*curses: on hierarchies for all locales. The default value is
XTerm*Font: 6x10 <XRoot>/lib/X11/locale, i.e. normally
XTerm*scrollBar: on /usr/X11R6/lib/X11/locale.
XTerm*scrollbar*thickness: 5
XTerm*multiClickTime: 500 XENVIRONMENT
XTerm*charClass: 33:48,37:48,45-47:48,64:48 This must point to a file containing X resources.
XTerm*cutNewline: off The default is $HOME/.Xdefaults-<hostname>. Unlike
XTerm*cutToBeginningOfLine: off <XRoot>/lib/X11/Xresources, it is consulted each
XTerm*titeInhibit: on time an X application starts.
XTerm*ttyModes: intr ^c erase ^? kill ^u
XLoad*Background: gold XFILESEARCHPATH
XLoad*Foreground: red This must contain a colon separated list of path
XLoad*highlight: black templates, where libXt will search for resource
XLoad*borderWidth: 0 files. The default value consists of
emacs*Geometry: 80x65-0-0
emacs*Background: rgb:5b/76/86 <XRoot>/lib/X11/%L/%T/%N%C%S:\
emacs*Foreground: white <XRoot>/lib/X11/%l/%T/%N%C%S:\
emacs*Cursor: white <XRoot>/lib/X11/%T/%N%C%S:\
emacs*BorderColor: white <XRoot>/lib/X11/%L/%T/%N%S:\
emacs*Font: 6x10 <XRoot>/lib/X11/%l/%T/%N%S:\
xmag*geometry: -0-0 <XRoot>/lib/X11/%T/%N%S
xmag*borderColor: white
i.e. normally
If these resources were stored in a file called .Xre-
sources in your home directory, they could be added to any /usr/X11R6/lib/X11/%L/%T/%N%C%S:\
existing resources in the server with the following com- /usr/X11R6/lib/X11/%l/%T/%N%C%S:\
mand: /usr/X11R6/lib/X11/%T/%N%C%S:\
/usr/X11R6/lib/X11/%L/%T/%N%S:\
% xrdb -merge $HOME/.Xresources /usr/X11R6/lib/X11/%l/%T/%N%S:\
/usr/X11R6/lib/X11/%T/%N%S
This is frequently how user-friendly startup scripts merge
user-specific defaults into any site-wide defaults. All A path template is transformed to a pathname by
sites are encouraged to set up convenient ways of automat- substituting:
ically loading resources. See the Xlib manual section
Resource Manager Functions for more information. %N => name (basename) being searched for
%T => type (dirname) being searched for
ENVIRONMENT %S => suffix being searched for
DISPLAY %C => value of the resource "customization"
This is the only mandatory environment variable. It (class "Customization")
must point to an X server. See section "Display %L => the locale name
Names" above. %l => the locale's language (part before '_')
%t => the locale's territory (part after '_` but before '.')
XAUTHORITY %c => the locale's encoding (part after '.')
This must point to a file that contains authoriza-
tion data. The default is $HOME/.Xauthority. See XUSERFILESEARCHPATH
Xsecurity(7x), xauth(1), xdm(1), Xau(3). This must contain a colon separated list of path
templates, where libXt will search for user depen-
ICEAUTHORITY dent resource files. The default value is:
This must point to a file that contains authoriza-
tion data. The default is $HOME/.ICEauthority. $XAPPLRESDIR/%L/%N%C:\
$XAPPLRESDIR/%l/%N%C:\
LC_ALL, LC_CTYPE, LANG $XAPPLRESDIR/%N%C:\
The first non-empty value among these three deter- $HOME/%N%C:\
mines the current locale's facet for character han- $XAPPLRESDIR/%L/%N:\
dling, and in particular the default text encoding. $XAPPLRESDIR/%l/%N:\
*- *&
$XAPPLRESDIR/%N:\
$HOME/%N These variables influence the X Keyboard Extension.
TRADEMARKS
X Window System is a trademark of X Consortium, Inc.
AUTHORS
A cast of thousands, literally. The Release 6.3 distribu-
tion is brought to you by X Consortium, Inc. The names of
all people who made it a reality will be found in the
individual documents and source files. The staff members
at the X Consortium responsible for this release are:
Donna Converse (emeritus), Stephen Gildea (emeritus),
Kaleb Keithley, Matt Landau (emeritus), Ralph Mor (emeri-
tus), Janet O'Halloran, Bob Scheifler, Ralph Swick, Dave
Wiggins (emeritus), and Reed Augliere.