LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-06-2005, 09:31 AM   #1
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
command to count how many lines in a file?


im curious if there is a command i could use to read a file and see how many lines are in the file. thanks in advanced.
 
Old 01-06-2005, 09:32 AM   #2
miko3k
LQ Newbie
 
Registered: Dec 2004
Location: kremnica, slovakia, europe, earth, sol :)
Distribution: slackware
Posts: 13

Rep: Reputation: 0
wc < myfile
 
Old 01-06-2005, 09:42 AM   #3
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
thanks
 
Old 01-06-2005, 10:42 AM   #4
wipe
Member
 
Registered: Jun 2004
Location: High Green
Distribution: Fedora Core 4
Posts: 180

Rep: Reputation: 30
wc -l<myfile

or

cat myfile|wc -l

gives the linecount only (no word or byte counts). See man wc (men's toilet? ).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
count total number of lines in several files xushi Programming 5 11-12-2005 04:42 PM
How to count how many lines of code my project is? The_Nerd Programming 4 08-30-2004 08:26 PM
Count of unread messages from command line rebuke Linux - Software 0 12-26-2003 06:41 PM
use file data in command lines karlis Linux - General 3 08-29-2003 07:27 PM
command lines? rockin chair Linux - General 5 04-28-2002 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration