Counting number of lines or characters

Problem

We want to count the number of lines, characters or words in a file

Solution

To count the number of characters, words or lines, we use wc

    # this shows number of line, words, character respectively
    wc <file>

    # show number of lines
    wc -l <file>

    # show number of words
    wc -w <file>

    # show number of characters
    wc -c <file>

results matching ""

    No results matching ""