Sunday, 23 July 2017

Count number of characters in file from command line and Vim

Count number of characters in file from command line and Vim


The command wc prints several file statistics: bytes, lines, words, etc. Using the -m option we can count the number of characters in a text file.

Install

Open a terminal window and run:

wc -m FILE

We can count the number of characters from Vim editor using this ex command:

:!wc -m %

References

wc(1) - Linux man page
download
alternative link download

Like the Post? Do share with your Friends.