Linux WC Command

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.

Syntax

$wc [file_name]

Example

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.

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!