this command is used to counting lines,words,characters from a file,using wc command options like you can count the no of word in your file used -w option to count no of word in file the following example and discription of wc command.
$wc [file_name]
in this example count the number of line in file.
$wc -l file1.txt
Options
Sr.No |
Options |
Descriptions |
---|---|---|
01 |
-l |
count the number of lines. |
02 |
-w |
count the number of word. |
03 |
-c |
count the number of characters. |
04 |
-L |
show the length of the longest line from the file. |
05 |
-help |
show the available options. |