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 [2021/07/30 13:51] – [type] pteu | informatique:linux:commandes_linux [2021/09/22 07:41] – [traceroute] pteu | ||
---|---|---|---|
Line 2077: | Line 2077: | ||
</ | </ | ||
+ | =====printf===== | ||
+ | |||
+ | Comme [[informatique: | ||
+ | <code bash> | ||
+ | a=12; b=34; c=' | ||
+ | printf 'a=%i, b=%i, c=%s\n' | ||
+ | a=12, b=34, c=toto | ||
+ | </ | ||
+ | '' | ||
+ | |||
+ | Pour formater l' | ||
+ | <code bash> | ||
+ | a=12; b=34; c=' | ||
+ | # on aligne $a et $b à droite sur 5 colonnes, et $c à gauche sur 20 colonnes | ||
+ | printf ' | ||
+ | a= 12, b= 34, c=toto | ||
+ | </ | ||
+ | |||
+ | ====Afficher x fois le même caractère==== | ||
+ | |||
+ | Pour afficher 10 fois le caractère " | ||
+ | <code bash> | ||
+ | printf ' | ||
+ | ========== | ||
+ | </ | ||
=====ps===== | =====ps===== | ||
Line 2101: | Line 2126: | ||
</ | </ | ||
+ | Afficher les processus les plus consommateurs de mémoire/de CPU : | ||
+ | <code bash> | ||
+ | ps -eo pmem, | ||
+ | ps -eo pmem, | ||
+ | </ | ||
=====pstree===== | =====pstree===== | ||
Line 2767: | Line 2797: | ||
</ | </ | ||
=====traceroute===== | =====traceroute===== | ||
- | [[http:// | ||
- | L' | ||
- | Certains routeurs ne communiquent pas d'informations | + | [[http:// |
+ | L' | ||
+ | |||
+ | Certains routeurs ne communiquent pas d'information | ||
<code bash> | <code bash> | ||
traceroute google.fr | traceroute google.fr | ||
Line 2789: | Line 2820: | ||
</ | </ | ||
+ | Par défaut le protocole UDP/33434-5 est utilisé mais il peut être filtré. On peut donc demander au traceroute de changer de port ('' | ||
=====trap===== | =====trap===== |
informatique/linux/commandes_linux.txt · Last modified: 2024/04/05 06:58 by pteu