Table des matières
Dernière mise-à-jour : 2020/01/30 03:28
SO104 - Aide et Documentation
Vous êtes actuellement en train d'utiliser le shell sh. Vous devez maintenant utiliser le shell bash.
Saisissez dons la commande suivante :
# /usr/bin/bash bash-3.00#
L'Aide aux Commandes Internes du Shell bash
Les commandes internes au shell sont des commandes telles cd. Pour vérifier le type de commande, il faut utiliser la commande type :
bash-3.00# type cd cd is a shell builtin
Le shell bash possède la commande help. Utilisée seule, cette commande fournit la liste des commandes internes :
bash-3.00# help GNU bash, version 3.00.16(1)-release (i386-pc-solaris2.10) These shell commands are defined internally. Type `help' to see this list. Type `help name' to find out more about the function `name'. Use `info bash' to find out more about the shell in general. Use `man -k' or `info' to find out more about commands not in this list. A star (*) next to a name means that the command is disabled. %[DIGITS | WORD] [&] (( expression )) . filename [arguments] : [ arg... ] [[ expression ]] alias [-p] [name[=value] ... ] bg [job_spec] bind [-lpvsPVS] [-m keymap] [-f fi break [n] builtin [shell-builtin [arg ...]] caller [EXPR] case WORD in [PATTERN [| PATTERN]. cd [-L|-P] [dir] command [-pVv] command [arg ...] compgen [-abcdefgjksuv] [-o option complete [-abcdefgjksuv] [-pr] [-o continue [n] declare [-afFirtx] [-p] [name[=val dirs [-clpv] [+N] [-N] disown [-h] [-ar] [jobspec ...] echo [-neE] [arg ...] enable [-pnds] [-a] [-f filename] eval [arg ...] exec [-cl] [-a name] file [redirec exit [n] export [-nf] [name[=value] ...] or false fc [-e ename] [-nlr] [first] [last fg [job_spec] for NAME [in WORDS ... ;] do COMMA for (( exp1; exp2; exp3 )); do COM function NAME { COMMANDS ; } or NA getopts optstring name [arg] hash [-lr] [-p pathname] [-dt] [na help [-s] [pattern ...] history [-c] [-d offset] [n] or hi if COMMANDS; then COMMANDS; [ elif jobs [-lnprs] [jobspec ...] or job kill [-s sigspec | -n signum | -si let arg [arg ...] local name[=value] ... logout popd [+N | -N] [-n] printf format [arguments] pushd [dir | +N | -N] [-n] pwd [-PL] read [-ers] [-u fd] [-t timeout] [ readonly [-af] [name[=value] ...] return [n] select NAME [in WORDS ... ;] do CO set [--abefhkmnptuvxBCHP] [-o opti shift [n] shopt [-pqsu] [-o long-option] opt source filename [arguments] suspend [-f] test [expr] time [-p] PIPELINE times trap [-lp] [arg signal_spec ...] true type [-afptP] name [name ...] typeset [-afFirtx] [-p] name[=valu ulimit [-SHacdflmnpstuv] [limit] umask [-p] [-S] [mode] unalias [-a] name [name ...] unset [-f] [-v] [name ...] until COMMANDS; do COMMANDS; done variables - Some variable names an wait [n] while COMMANDS; do COMMANDS; done { COMMANDS ; }
L'aide concernant une commande spécifique peut être obtenu en passant la commande concernée en argument à la commande help :
bash-3.00# help umask umask: umask [-p] [-S] [mode] The user file-creation mask is set to MODE. If MODE is omitted, or if `-S' is supplied, the current value of the mask is printed. The `-S' option makes the output symbolic; otherwise an octal number is output. If `-p' is supplied, and MODE is omitted, the output is in a form that may be used as input. If MODE begins with a digit, it is interpreted as an octal number, otherwise it is a symbolic mode string like that accepted by chmod(1).
La Commande man
La commande man donne accès au manuel de la commande passé en argument :
Mise en page en cours. Veuillez patienter... terminé User Commands rm(1) NAME rm, rmdir - remove directory entries SYNOPSIS /usr/bin/rm [-f] [-i] file... /usr/bin/rm -rR [-f] [-i] dirname... [file...] /usr/xpg4/bin/rm [-fiRr] file... /usr/bin/rmdir [-ps] dirname... DESCRIPTION /usr/bin/rm /usr/xpg4/bin/rm The rm utility removes the directory entry specified by each file argument. If a file has no write permission and the standard input is a terminal, the full set of permissions (in octal) for the file are printed followed by a question mark. This is a prompt for confirmation. If the answer --A suivre--(7%)
Une page de manuel peut contenir plusieurs sections :
Section | Contenu |
---|---|
NOM | Nom et rôle de la commande |
SYNOPSIS | Syntaxe de la commande, paramètres et arguments |
DESCRIPTION | Mode d'emploi et les arguments principaux |
OPTIONS | Descriptions détaillées de chaque paramètre |
EXEMPLES | Exemples d'utilisation de la commande |
ENVIRONNEMENT | Fonctionnement selon l'environnement du shell |
CONFORMITÉ | Éventuelles normes auxquelles la commande se conforme |
BOGUES | Éventuelles bogues connues |
DIAGNOSTICS/RETOUR | Codes d'erreur et leur signification |
VOIR AUSSI | Commandes liées à celle du manuel actuel |
La navigation dans la page de manuel se fait grâce à l'utilisation de certaines touches :
Touche | Fonction |
---|---|
Espace | Faire défiler une page complète |
Entrée | Faire défiler la page ligne par ligne |
↑ | Faire défiler la page une ligne vers le haut |
↓ | Faire défiler la page une ligne vers le bas |
PageHaut | Faire défiler une demi-page vers le haut |
PageBas | Faire défiler une demi-page vers le bas |
Début | Se positionner au début du manuel |
Fin | Se positionner à la fin du manuel |
/ | Rechercher la chaîne qui suit la touche /. La touche n recherche l'occurrence suivante. La touche N recherche l'occurrence précédente |
Q | Quitter le manuel |
Un manuel complet est fait de plusieurs sections :
Section | Contenu |
---|---|
1 | User Commands |
1M | System Administration Commands |
2 | System calls |
3 | C library functions |
4 | File formats and conventions |
5 | Standards, Environments, and Macros |
6 | Games and Demos |
7 | Device and Network Interfaces |
8 | Not used |
9 | DDI and DKI Driver Entry Points / DDI and DKI Kernel Functions / DDI and DKI Properties and Data Structures |
Les différentes sections disponibles sont visibles grâce à l'utilisation de la commande whereis :
bash-3.00# whereis passwd passwd: /etc/passwd /usr/bin/passwd /usr/man/man1/passwd.1 /usr/man/man4/passwd.4
Pour visualiser une section spécifique, il convient de préciser son numéro avec l'option -s :
$ man -s 4 passwd [Entrée]
Les Commandes catman et whatis
Chaque page de manuel contient une brève description. Ces descriptions ainsi que le nom du manuel sont stockés dans la base de données /usr/share/man/windex.
Cette base de données peut être maintenue manuellement par root en invoquant l'exécutable /usr/bin/catman -w :
bash-3.00# /usr/bin/catman -w bash-3.00# ls -l /usr/share/man/windex -rw-r--r-- 1 root root 1103544 août 12 18:36 /usr/share/man/windex
La commande whatis peut maintenant être utilisée pour identifier les sections des manuels disponibles pour une commande donnée :
bash-3.00# whatis passwd passwd passwd (1) - change login password and password attributes passwd passwd (4) - password file
La Commande apropos
La commande apropos cherche dans la base de données whatis la chaine de caractères passée en argument à la commande. Sans option, la sortie obtenue est identique à la commande man -k :
bash-3.00# apropos passwd d_passwd d_passwd (4) - dial-up password file getpw getpw (3c) - get passwd entry from UID kpasswd kpasswd (1) - change a user\&'s Kerberos password nispasswd nispasswd (1) - change NIS+ password information nispasswdd rpc.nispasswdd (1m) - NIS+ password update daemon pam_passwd_auth pam_passwd_auth (5) - authentication module for password passwd passwd (1) - change login password and password attributes passwd passwd (4) - password file pwconv pwconv (1m) - installs and updates /etc/shadow with information from /etc/passwd rpc.nispasswdd rpc.nispasswdd (1m) - NIS+ password update daemon rpc.yppasswdd rpc.yppasswdd (1m) - server for modifying NIS password file vncpasswd vncpasswd (1) - change a VNC password yppasswd yppasswd (1) - change your network password in the NIS database yppasswdd rpc.yppasswdd (1m) - server for modifying NIS password file yppasswdd yppasswdd (4) - configuration file for rpc\&.yppasswdd (NIS password daemon)
bash-3.00# man -k passwd d_passwd d_passwd (4) - dial-up password file getpw getpw (3c) - get passwd entry from UID kpasswd kpasswd (1) - change a user\&'s Kerberos password nispasswd nispasswd (1) - change NIS+ password information nispasswdd rpc.nispasswdd (1m) - NIS+ password update daemon pam_passwd_auth pam_passwd_auth (5) - authentication module for password passwd passwd (1) - change login password and password attributes passwd passwd (4) - password file pwconv pwconv (1m) - installs and updates /etc/shadow with information from /etc/passwd rpc.nispasswdd rpc.nispasswdd (1m) - NIS+ password update daemon rpc.yppasswdd rpc.yppasswdd (1m) - server for modifying NIS password file vncpasswd vncpasswd (1) - change a VNC password yppasswd yppasswd (1) - change your network password in the NIS database yppasswdd rpc.yppasswdd (1m) - server for modifying NIS password file yppasswdd yppasswdd (4) - configuration file for rpc\&.yppasswdd (NIS password daemon)
Notez que les numéros entre parenthèses indiquent les sections disponibles.
<html> <center> Copyright © 2011-2018 I2TCH LIMITED.<br><br> </center> </html>