How to count the total number of lines, words, and characters contained in a file in Unix?

How to count the total number of lines, words, and characters contained in a file in Unix?

Senior Developer Asked on December 7, 2017 in UNIX.
Add Comment
1 Answer(s)
    Using wc command you can count number of lines, words, characters of a file.

    
    wc welcome.txt
    
    

    Output:
    2 20 124 welcome.txt
    1st number represent number of lines. 2nd number represent number of words. 3rd number represent number of bytes.
    Team Leader Answered on January 7, 2018.
    Add Comment

    Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.