WC Command in Linux: WC stands for Word Count It is used to find out number of lines, word count, bytes and characters count in the given file. This article will assist you to use WC command in Linux Kubuntu 19.10.
WC Command Syntax:
This is a basic syntax of WC command in Linux.
WC Command Options:
The options below may be used to select which counts are printed, always in the following order: newline, word, character, byte, maximum line length. -c, --bytes print the byte counts -m, --chars print the character counts -l, --lines print the newline counts --files0-from=F read input from the files specified by NUL-terminated names in file F; If F is - then read names from standard input -L, --max-line-length print the maximum display width -w, --words print the word counts --help display this help and exit --version output version information and exit
WC Command Examples:
Let’s check the word count of the text file “LXD” and the syntax is,
This command displays the Number of Lines, Words, and Characters in the given file.
-l: This command displays the Number of Lines in the given file.
-w: This command displays the Number of Words in the given file.
-c: This command displays the Count of bytes in the given file.
-m: This command displays the Number of Characters in the given file.
Wc Version Check Command:
WC Command Help Options:
- Launch the terminal by pressing the shortcut keys CTRL+ALT+T.
- Execute the following command.
A Short summary:
We hope that the above article shows you the directions and the guidelines to work with the WC Command in Linux with practical examples and screenshots. Please let us know if you have any queries regarding this article. Share your valuable suggestion in the comment section. Thank you for visiting our website Tec Robust.