New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

taildir

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taildir

A simple directory watcher that recursively monitors file changes using only native Node.js libraries

latest
npmnpm
Version
1.1.3
Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source

taildir

A lightweight Node.js directory watcher that monitors file changes recursively and outputs new content as it's appended - similar to tail -f but for entire directories.

Features

  • Recursively watches all files in a directory tree
  • Outputs only new content when files grow (like tail -f)
  • Filter by file extensions (e.g., watch only .log files)
  • Ignores hidden files and temporary files
  • Lightweight - uses only native Node.js libraries
  • Trims empty lines from output

Installation

npm install -g taildir

Or run directly with npx:

npx taildir <directory>

Usage

Watch the current directory:

taildir

Watch a specific directory:

taildir /path/to/directory

Watch only specific file extensions:

taildir /path/to/directory -e js,ts,json
taildir --ext log,txt

Example Output

Starting to watch: /home/user/logs
Press Ctrl+C to stop

==> /home/user/logs/app.log <==
[2024-01-15 10:30:45] Application started
[2024-01-15 10:30:46] Connected to database

==> /home/user/logs/error.log <==
[2024-01-15 10:31:02] ERROR: Failed to process request

How It Works

  • When starting, taildir records the current size of all files
  • When a file grows, it reads and displays only the new content
  • New files created while watching will show their complete content
  • Files that shrink (truncated) are tracked but don't produce output
  • Hidden files (starting with .) are ignored

Use Cases

  • Monitor application logs across multiple files
  • Watch output directories for generated content
  • Track changes in data files
  • Debug file-writing applications

Requirements

  • Node.js >= 14.0.0

License

MIT

Keywords

watch

FAQs

Package last updated on 15 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts