informatique:linux:commandes_linux
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
informatique:linux:commandes_linux [2020/01/08 10:32] – [declare] pteu | informatique:linux:commandes_linux [2020/02/04 14:27] – [history] pteu | ||
---|---|---|---|
Line 986: | Line 986: | ||
=====history===== | =====history===== | ||
- | Permet d' | + | Permet d' |
<code bash> | <code bash> | ||
history | history | ||
Line 996: | Line 996: | ||
| | ||
</ | </ | ||
+ | |||
+ | Lors de la fermeture de session, cette liste est ajoutée au fichier indiqué dans la variable '' | ||
+ | * le format de timestamp de chaque commande avec la variable '' | ||
+ | * la taille de l' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | Exemple : | ||
+ | <file bash .bashrc> | ||
+ | HISTCONTROL=ignoredups: | ||
+ | HISTTIMEFORMAT=" | ||
+ | HISTSIZE=10000 | ||
+ | HISTFILESIZE=20000 | ||
+ | </ | ||
On peut relancer une commande de l' | On peut relancer une commande de l' | ||
Line 1018: | Line 1032: | ||
</ | </ | ||
- | On efface l' | + | On efface l' |
On peut loguer (dans ''/ | On peut loguer (dans ''/ | ||
Line 2455: | Line 2469: | ||
</ | </ | ||
- | On peut filtrer le résultat par type d' | + | On peut filtrer le résultat par type d' |
<code bash> | <code bash> | ||
+ | # N' | ||
$ stat -c " | $ stat -c " | ||
2018-08-30 18: | 2018-08-30 18: | ||
+ | |||
+ | # Afficher la taille du fichier (ici il est vide) | ||
+ | $ stat -c " | ||
+ | 0 | ||
</ | </ | ||
Line 2640: | Line 2659: | ||
=====type===== | =====type===== | ||
- | **type** est une commande interne de bash qui indique comment chaque | + | **type** est une commande interne de bash qui permet de savoir à quoi correspond un "nom" |
- | * '' | ||
<code bash> | <code bash> | ||
- | # lister toutes les fonctions | + | type -t ls |
- | declare | + | builtin |
- | [..] | + | type -t l |
- | declare | + | alias |
+ | type l | ||
+ | l is aliased to ' | ||
+ | |||
+ | type -t ssh | ||
+ | | ||
+ | type ssh | ||
+ | ssh is hashed (/ | ||
- | # afficher le code de celle-ci (équivalent de " | ||
type -a titreterm | type -a titreterm | ||
- | titreterm | + | titreterm |
- | titreterm () | + | |
- | { | + | { |
if [[ $# -eq 1 && -n $1 ]]; then | if [[ $# -eq 1 && -n $1 ]]; then | ||
echo -ne " | echo -ne " | ||
fi | fi | ||
- | } | + | } |
</ | </ | ||
+ | |||
+ | Voir aussi : [[informatique: | ||
=====update-rc.d===== | =====update-rc.d===== |
informatique/linux/commandes_linux.txt · Last modified: 2024/04/05 06:58 by pteu