English
|
Login & Registration
Dreevoo.com
CONTRIBUTE
FORUM
INFO
|
Programs
|
Other applications
|
Open source programs
| How to count number of words and rows in Linux files
Guest
Topics
Programs
Languages
Recipes
Home
Shortcuts
Microsoft Windows
Microsoft Office
Adobe Photoshop
Adobe Dreamweaver
Adobe Premiere
The Gimp
Apple software
Mobile platforms
Web services
Other applications
Programming languages
French language
Greek language
Italian language
German language
Portuguese language
Russian language
Spanish language
Vegeterian dishes
Meat dishes
Seafood
Pasta
Desserts
Drinks
Other dishes
Automotive
Magic tricks
Photography
Household
Computers
Do It Yourself
Environment and health
Technology
Space
Interesting
Science and nature
Other
Knowledge
Technology
Fun
Curiosity
Computing
Culinary
Culture
Geography
History
Languages
Science
How to count number of words and rows in Linux files
Linux wc is a simple command that enables you to find out how many words and rows does a text file or output contain.
Author:
mat
|
Version:
Ubuntu 12.04
| 24th July 2013 |
Comment (
1
)
1.
As already mentioned we will use a
wc
command.
As an example let's take a file names text.txt which contains text you can see on the image.
Recommended tutorial:
Linux Terminal basics
2.
Usage of the command is pretty straight forward.
wc file_name
In our case:
wc text.txt
We get three numbers as a result
First number is the
number of rows
, second number represent the
number of words
and the third
number of characters
.
3.
The wc command can also be applied with all other programs or commands that give an output as a result.
In this case we only need to add
| wc
Let's take the folder listing
ls -al
as an example:
ls -al | wc
Please login to post a comment
online learning made for people
Dreevoo.com
|
CONTRIBUTE
|
FORUM
|
INFO