faqts : Computers : Operating Systems : Linux : File System

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 14 people (79%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Operating system: Linux: Command: File: Word: Count: How to count the amount of words in a file?

Nov 22nd, 2003 09:18
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 22 November 2003 - 06:07 pm -------------------

Operating system: Linux: Command: File: Word: Count: How to count the 
amount of words in a file?

---

Steps: Overview:

 1. -Type the command

   wc <your filename>

   ---

    e.g.

     wc ddd.dok


 2. This will print

    <word total> <newline total> <bytes total> <yourfilename>

    ---

    e.g.

     5 6 12 ddd.dok

    ---

    if the content of this file 'ddd.dok' is:

    1 2

    3

    4

    5

    6

---
---

Type

 wc --help

for the options.

----------------------------------------------------------------------