Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CoderExamples/read-last-lines

Open more actions menu
 
 

Read Last N Lines

NPM

Read in the last N lines of a file efficiently using node.js and fs.

Installation

npm install read-last-lines --save

Usage

example reading last 50 lines of a file

const readLastLines = require('read-last-lines');
readLastLines.read('path/to/file', 50)
	.then((lines) => console.log(lines));

Contributing

More details can be found in CONTRIBUTING.md

  1. Fork it on Github https://github.com/alexbbt/read-last-lines
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request.

About

Read in the last N lines of a file efficiently using node.js and fs.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.7%
  • TypeScript 5.3%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.