LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2003, 01:14 PM   #1
uraja
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
Counting SLOC of multiple files


I am using "wc -l" command to count SLOC. How can I use the command to run on all the files in my directory without having to specify the name of each file seperatly
 
Old 09-12-2003, 07:12 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Assuming that the directory you want is /home/user/example then some variation of the following command should do what you want:

find /home/user/example -iname "*" -exec wc {} -l \;
 
  


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
html2ps multiple files bhar0761 Linux - General 3 11-08-2009 12:01 PM
Physical vs. logical SLOC liguorir Programming 0 06-01-2004 08:04 PM
SLOC guidelines liguorir Programming 0 06-01-2004 08:01 PM
Help I need help tarring multiple files in multiple directories VisionZ Linux - Newbie 28 03-25-2004 05:25 PM
counting number of files akin81 Linux - Newbie 6 03-25-2004 01:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:06 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