Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created May 10, 2017 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/67f4e38317f928bf32c0b847e3f9cae2 to your computer and use it in GitHub Desktop.
Save miguelmota/67f4e38317f928bf32c0b847e3f9cae2 to your computer and use it in GitHub Desktop.
Node.js tail command
const {spawn} = require('child_process')
const proc = spawn('tail', ['-f', 'events.log'])
proc.stdout.on('data', data => {
process.stdout.write(data)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment