14,954
edits
m (→file operation) |
|||
| Line 38: | Line 38: | ||
* {{kbd | key= <nowiki>find . -type f -exec cat {} + | wc -l</nowiki>}} for {{Linux}} & {{Mac}} to print the newline count of all files on all subdirectories<ref>[https://stackoverflow.com/questions/13727917/use-wc-on-all-subdirectories-to-count-the-sum-of-lines linux - Use wc on all subdirectories to count the sum of lines - Stack Overflow]</ref> | * {{kbd | key= <nowiki>find . -type f -exec cat {} + | wc -l</nowiki>}} for {{Linux}} & {{Mac}} to print the newline count of all files on all subdirectories<ref>[https://stackoverflow.com/questions/13727917/use-wc-on-all-subdirectories-to-count-the-sum-of-lines linux - Use wc on all subdirectories to count the sum of lines - Stack Overflow]</ref> | ||
* {{kbd | key= <nowiki>wc -l "$(cygpath -u '<path to file>')"</nowiki>}} for cygwin on {{Win}} ex: {{kbd | key= <nowiki>wc -l "$(cygpath -u 'c:\Program Files\file.txt')"</nowiki>}}<ref>[[Cygwin convert windows path to linux path]]</ref> | * {{kbd | key= <nowiki>wc -l "$(cygpath -u '<path to file>')"</nowiki>}} for cygwin on {{Win}} ex: {{kbd | key= <nowiki>wc -l "$(cygpath -u 'c:\Program Files\file.txt')"</nowiki>}}<ref>[[Cygwin convert windows path to linux path]]</ref> | ||
{{exclaim}} [https://stackoverflow.com/questions/28038633/wc-l-is-not-counting-last-of-the-file-if-it-does-not-have-end-of-line-character linux - wc -l is NOT counting last of the file if it does not have end of line character - Stack Overflow] | |||
=== Save the console message as text file === | === Save the console message as text file === | ||