Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com
huuphan.com. Powered by Blogger.

wc command in Linux

 In this tutorial, How to use wc command in Linux. it is one of the core Linux utilities, no need to install it.

You can counts the lines, words, and bytes in a file or selection of file. etc.

wc command in Linux

The simplest way to use wc command as below:

 

As the picture, wc command scan the file and count the line, words, and bytes and display terminal windows.

You can pass multiple files to wc command.

wc command line option

The display lines in file

How to words in a file

Display characters in file use -m option

the length of the longest line in a file


Use piping input to wc command to  count the occurrences of each extension type.

 find ./* -type f | rev | cut -d'.' -f1 | rev | sort | uniq

 find ./* -type f | rev | cut -d'.' -f1 | rev | sort | uniq | wc -l

 

Thanks for reading wc command in Linux My blog Zimbra Mail Server,linux,bash script,centos,linux command I hope this is useful.

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com