Antti wrote:
How can I count how many code lines I have written? I have many php files in one directory. I'm using linux.Do you know any non-php way to count the lines.
from a directory one level above where all your files lie do this:

(assuming all you files are in a directory called php)

#ls -R php | wc -l

this will give you the total number of files and directories

If you want to find out how many lines in a file do

# cat myfile.php | wc -l

If you want to count the lines of all files in a directory ending with .php do

# cat *.php | wc -l


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to