- Linux Systems
- How To Count The Number Of Lines In A File In Linux Shell Command
This Page Contains information about How To Count The Number Of Lines In A File In Linux Shell Command By tomas in category Linux Systems with 52 Replies. Last Upated: Tue Oct 06, 2015 
Sun Feb 25, 2007
ok, you have a file and you want to know how many lines it has right?
if you are like me, sometimes we need to know this infromation for some reason or another. well today you are in luck because you've found a cool little tutorial i wrote just to show people like you and me who are learning linux how to send or used linux shell command.
ok the command you need to use is wc
for example, if i have a file called my_text.txt and i want to know how many lines this file has, all if would have to do is send this command:
wc -l my_text.txt
COUNTING ONLY LINES
Like mos UNIX commands, the wc command offers options that instruc the wc to run in different ways, you can tell wc to limit the count just lines, words or characters or any combination of each.
did this short tutorial helped you?