tailswitch - Tail a file, but switch when another file with newer name appears
This document describes version 0.001 of tailswitch (from Perl distribution App-tailswitch), released on 2017-06-09.
% tailswitch [OPTIONS] <GLOB PATTERN> ...
Don't forget to quote the glob pattern to prevent shell expansion. Example:
% tailswitch '/var/log/http_access.*.log' '/var/log/https_access.*.log'
This utility can tail a file, but switch when another file with newer name appears. This utility is useful when tailing log that are written to separated files (usually with timestamps in their names). For example, on an Spanel server, the webserver is configured to write to daily log files:
/s/<SITE-NAME>/syslog/http_access.<YYYY>-<MM>-<DD>.log /s/<SITE-NAME>/syslog/https_access.<YYYY>-<MM>-<DD>.log
No-op, provided just for compatibility with tail Unix command. Heavy tail users might have -f in their muscle memory.
tail
-f
If this option is given, then when a new file appears it will not be read from the beginning but directly tail'ed.
Please visit the project's homepage at https://metacpan.org/release/App-tailswitch.
Source repository is at https://github.com/perlancar/perl-App-tailswitch.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-tailswitch
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
tail Unix command.
tail from ppt.
Logfile::Tail::Switch which is used by this utility.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2017 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::tailswitch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::tailswitch
CPAN shell
perl -MCPAN -e shell install App::tailswitch
For more information on module installation, please visit the detailed CPAN module installation guide.