[kanchilug] 1D1C - wc

  • From: Dhana Sekar <tkdhanasekar@xxxxxxxxx>
  • To: ILUG-C <ilugc@xxxxxxxxxxxxx>, kanchilug@xxxxxxxxxxxxx
  • Date: Sat, 29 Jun 2013 14:34:25 +0530

command: wc
purpose: print newline, word, and byte counts for each file

syntax: wc [options] filename

examples:

1. To print the byte counts
    $ wc -c filename

2. To print the character counts
    $ wc -m filename

3. To print the newline counts
    $ wc -l filename

4. To print the length of the longest line
    $ wc -L filename

5. To print the word counts
    $ wc -w filename

6. $ wc
    prints A B C filename
    A - Number of lines
    B - Number of words
    C - Number of bytes

regards,
dhanasekar
Kanchilug Blog : http://kanchilug.wordpress.com

To subscribe/unsubscribe kanchilug mailing list : 
http://kanchilug.wordpress.com/join-mailing-list/

Other related posts: