I have large text files, which range between 30MB and 10GB. How can I count the number of lines in a file using Node.js?
30MB
10GB
Node.js
I hav
You could do this as the comments suggest using wc
wc
var exec = require('child_process').exec; exec('wc /path/to/file', function (error, results) { console.log(results); });