Linux wc command Gathering Text statistics count Line Word Character

Linux Wc command used to count the no of words in Linux.
Syntax #wc file name
After executing this command it will return the no of character
No of line and no of word
Example now it will display how many character present in the /etc/passwd directory
[root@localhost ~]# wc /etc/passwd
40 59 1775 /etc/passwd

-w option display word count
[root@localhost ~]# wc -w /etc/passwd
59 /etc/passwd

-l option display line count
[root@localhost ~]# wc -l /etc/passwd
40 /etc/passwd

Post a Comment

0 Comments