This will count lines of every file in the folder, and give aggregate number of lines as well
find /path/to/dir -type f -name '*' | xargs wc -l
[Specifying the extension of file ]
find /path/to/dir -type f -name '*.c' | xargs wc -l
[This will lists the files in that folder with .c extension]
find /path/to/dir -type f -name '*.c'
No comments:
Post a Comment