The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SED: Update Last Line with Number Lines in File bmkux Shell Programming and Scripting 3 01-07-2008 10:16 PM
How to find number of lines in a file somesh_p Shell Programming and Scripting 2 12-19-2007 09:15 PM
total number of lines in a file Raynon Shell Programming and Scripting 9 10-04-2007 10:13 AM
cut a number of lines out of a file networkfre@k Shell Programming and Scripting 1 12-09-2005 01:46 AM
Counting The Number Of Duplicate Lines In a File crunchtime UNIX for Dummies Questions & Answers 2 07-04-2003 02:24 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-19-2004
GMMike GMMike is offline
Registered User
  
 

Join Date: Sep 2004
Posts: 32
Need ls to show number of lines in each file

Hi,
I need a command that would let ls show number of lines in each file rather than file size in KBs.

I tried using wc -l as a source of input to ls but I found a problem cutting the file name since wc generates a space delimited list.

Any suggestions?

Thanks.

GmMike.
  #2 (permalink)  
Old 11-19-2004
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
"wc -l *" will give a list of filenames in the current directory preceeded by the number of lines, plus a total at the bottom.

Cheers
ZB
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:31 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0