Ceci est une ancienne révision du document !
Table des matières
Oracle Solaris 10 : Les Fondamentaux
Présentation
Type d'Action (Article L. 6313-1) : Action d'acquisition, d'entretien ou de perfectionnement des connaissances.
Objectif : Maîtriser les bases de l'utilisation d'Oracle Solaris 10 en ligne de commande.
Public : Utilisateurs et Administrateurs Windows™, Mac, Linux.
Pré requis : Connaître un autre système d'exploitation.
Méthode d'apprentissage : Alternance entre un scénario pédagogique clair et précis et des travaux pratiques basés sur des cas et exemples concrets.
Type d'apprentissage : Apprentissage Accéléré.
Validation des acquis : Évaluations à l'aide de tests auto-correctifs.
Modalités : 14 heures.
Moyens pédagogiques : Support de cours en ligne téléchargeable au format PDF.
Ressources : Machine virtuelle Oracle Solaris 10.
Programme
- Système de Fichiers
- L'arborescence,
- La commande mount,
- Options de la commande,
- La commande umount,
- Options de la commande,
- Le fichier /etc/mntab,
- Options de montage pour un filesystem UFS,
- Le Filesystem UFS,
- Structure,
- boot block,
- Superbloc,
- Inodes,
- Blocs d'Indirection,
- Blocs de données,
- Liens Physiques,
- Liens Symboliques,
- Création,
- nbpi,
- free,
- opt,
- Vérification,
- Paramétrages,
- Validation des acquis,
- Commandes : mount, umount, ln, newfs, mkfs, fsck, tunefs.
- L'Editeur VI
- Présentation
- Lancer et Quitter VI
- Set
- Commandes du Curseur
- Insertion de Texte
- Recherche de Texte
- Suppression de Texte
- Copier - Coller
- Couper - Coller
- En cas de problème
- Validation des acquis
- Commandes : view, vi.
- Aide et Documentation
- La commande man
- La commande whatis
- La commande apropos
- Sites Internet
- Validation des acquis
- Commandes : man, whatis, apropos.
- Commandes de Base et Outils de Manipulation de Fichiers Texte
- Etude des commandes de base,
- Options et arguments,
- Expressions Régulières,
- Expressions régulières basiques,
- Expressions régulières étendues,
- Outils et Commandes sur les Fichiers,
- La commande grep,
- La commande egrep,
- La commande fgrep,
- La commande sed,
- La commande awk,
- La commande tr,
- La commande paste,
- La commande cut,
- La commande uniq,
- La commande split,
- La commande diff,
- La commande cmp,
- La commande patch,
- La commande strings,
- La commande comm,
- La commande head,
- La commande tail,
- Validation des acquis,
- Commandes : stty, date, who, df, vmstat, whoami, pwd, cd, ls, touch, echo, cp, file, cat, mv, mkdir, rmdir, rm, sort, more, find, whereis, which, uptime, w, uname, du, modinfo, clear, exit, logout, sleep, grep, egrep, fgrep, sed, awk, cut, uniq, tr, paste, split, diff, cmp, patch, strings, comm, head, tail.
- La Ligne de Commande
- Le Shell,
- Les Commandes Internes et Externes au shell,
- Les alias,
- Le Prompt,
- Rappeler des Commandes,
- Générer les fins de noms de fichiers,
- Le shell interactif,
- Codes retour,
- Redirections,
- Tubes,
- Substitutions de commandes,
- Chainage de commandes,
- Affichage des variables du shell,
- Les variables principales,
- Régionalisation et Internationalisation,
- Les variables spéciales,
- Options du shell ksh,
- Les Scripts Shell,
- Exécution,
- La commande read,
- Code de retour,
- La variable IFS,
- La commande test,
- La commande [[ expression ]],
- Opérateurs du shell,
- L'arithmétique,
- La commande expr,
- La commande let,
- Structures de contrôle,
- Boucles,
- Scripts de démarrage,
- Validation des acquis,
- Commandes : type, alias, unalias, chsh, history, wc, set, vi, script, read, test, expr, let, if, case, for, while.
Extrait du Cours
Solaris 10 - 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 © 2004-2017 Hugh Norris.<br><br> <a rel=“license” href=“http://creativecommons.org/licenses/by-nc-nd/3.0/fr/”><img alt=“Licence Creative Commons” style=“border-width:0” src=“http://i.creativecommons.org/l/by-nc-nd/3.0/fr/88x31.png” /></a><br />Ce(tte) oeuvre est mise à disposition selon les termes de la <a rel=“license” href=“http://creativecommons.org/licenses/by-nc-nd/3.0/fr/”>Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Pas de Modification 3.0 France</a>. </center> </html>