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/01 15:49] – [ps] 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===== |
informatique/linux/commandes_linux.txt · Last modified: 2024/04/05 06:58 by pteu