LinuxQuestions.org
Review your favorite Linux distribution.
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, 02: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, 08:12 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,593

Rep: Reputation: 188Reputation: 188
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 05:39 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration