Useful shortcuts for vi editor

Wednesday 27 May 2015

How to know total row number, word number and character number in Linux?

e.g.
$ wc myfile.txt
-> 5 13 56 myfile.txt 
5; total row number 
13; total word number
56; total character number

$ ls | wc -l
-> Total number of files in current directory