Rex::Commands::Tail(3pm)

Rex::Commands::Tail3pm

Tail a file version <= 1.0: all these functions will not be reported. all these functions are not idempotent.

Usage

 tail "/var/log/syslog";

Overview

With this module you can tail a file.

Exported functions

tail($file)

This function will tail the given file.

 task "syslog", "server01", sub {
   tail "/var/log/syslog";
 };

If you want to control the output format, you can define a callback function:

 task "syslog", "server01", sub {
   tail "/var/log/syslog", sub {
    my ($data) = @_;
    my $server = Rex->get_current_connection()->{'server'};
    print "$server>> $data\n";
   };
 };

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

From rex 1.16.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.