Search
Most active topics
Top posting users this month
No user |
GeoMap
How to calculate the number of lines of all files under a directory?
Page 1 of 1
How to calculate the number of lines of all files under a directory?
For exmaple, you can use to calculate all the javascript , C, C++, HTML,and java codes under a directory.
It utilized the expression feature of the 'find' command,
! for NOT
-o for OR
and you can use "\(" and "\)" as well.
- Code:
find -name "*.js" -o -name "*.c" -o -name "*.class" -o -name "*.html" -o -name "*.cpp" -o -name "*.h" |xargs cat | wc -l
It utilized the expression feature of the 'find' command,
! for NOT
-o for OR
and you can use "\(" and "\)" as well.
halala- 帖子数 : 99
金币(Coin) : 4515
注册日期 : 2012-08-17
Similar topics
» RFCview mode a great tool to read rfc txt files!
» Use rsync to synchronize certain type of files with --include and --exclude
» Change the home directory of ssh in cygwin
» cygwin screen Directory /tmp/uscreens/S-UserName must have mode 700
» Cannot find the easy-rsa directory in /usr/share/doc/openvpn/examples in Ubuntu and maybe Debain as well ?
» Use rsync to synchronize certain type of files with --include and --exclude
» Change the home directory of ssh in cygwin
» cygwin screen Directory /tmp/uscreens/S-UserName must have mode 700
» Cannot find the easy-rsa directory in /usr/share/doc/openvpn/examples in Ubuntu and maybe Debain as well ?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum