Count the number of file lines (single file ):
WC-l file
For example:
Homer @ Ubuntu :~ /Workspace/Android/Game $WC-l lgameandroid2dactivity. Java
906Lgameandroid2dactivity. Java
Count the number of rows of all files in the directory (all directories ):
Find.-Name *. Java | xargs WC-l
For example:
Homer @ Ubuntu :~ /Workspace/Android $Find.-Name *. Java | xargs WC-l
817./GAME/CORE/lhandler. Java
140./GAME/CORE/lflicker. Java
...
515./GAME/utils/collection/arraymap. Java
162./GAME/utils/collisionutils. Java
178./GAME/utils/numberutils. Java
68753Total
Sort the statistics directory by number of rows (sort by row size ):
Find.-Name *. Java | xargs WC-L | sort-n
Homer @ Ubuntu :~ /Workspace/Android $Find.-Name *. Java | xargs WC-L | sort-n
25./GAME/Action/sprite/colpolicable. Java
26./GAME/CORE/graphics/component/collisionquery. Java
27./GAME/CORE/graphics/filter/imagefilter. Java
28./GAME/lmode. Java
...
1467./GAME/CORE/Geom/path2d. Java
1919./GAME/CORE/graphics/screen. Java
2417./GAME/CORE/graphics/device/lgraphics. Java
3050./GAME/CORE/Geom/affinetransform. Java
68753Total
Sort the statistics directory by the number of rows (sort by row file name ):
Find.-Name *. Java | xargs WC-L | sort-K2
Homer @ Ubuntu :~ /Workspace/Android $Find.-Name *. Java | xargs WC-L | sort-K2
210./GAME/Action/actioncontrol. Java
116./GAME/Action/actionevent. Java
34./GAME/Action/actionlistener. Java
....
178./GAME/utils/numberutils. Java
342./GAME/utils/recordstoreutils. Java
58./GAME/utils/screenutils. Java
650./GAME/utils/stringutils. Java
68753Total