mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-23 21:22:09 +02:00
28 lines
754 B
Markdown
28 lines
754 B
Markdown
# wc
|
|
|
|
> Compte les lignes, les mots ou les octets.
|
|
> Plus d'informations : <https://www.gnu.org/software/coreutils/manual/html_node/wc-invocation.html>.
|
|
|
|
- Compte les lignes d'un fichier :
|
|
|
|
`wc --lines {{chemin/vers/fichier}}`
|
|
|
|
- Compte les mots d'un fichier :
|
|
|
|
`wc --words {{chemin/vers/fichier}}`
|
|
|
|
- Compte les octets d'un fichier :
|
|
|
|
`wc --bytes {{chemin/vers/fichier}}`
|
|
|
|
- Compte les caractères d'un fichier (en prenant en compte l'ensemble des caractères multi-octets) :
|
|
|
|
`wc --chars {{chemin/vers/fichier}}`
|
|
|
|
- Compte les lignes, les mots et les caractères depuis l'entrée standard `stdin` :
|
|
|
|
`{{find .}} | wc`
|
|
|
|
- Compte la longueur en nombre de caractères de la plus grande ligne d'un fichier :
|
|
|
|
`wc --max-line-length {{chemin/vers/fichier}}`
|