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 pagealternative link download