public function tail(LocalFile $file, $lines, array $options = [])
    {
        $this->options = $options;
        $this->lines = $lines;

        $postfix = $this->getOption('postfix', 'tail');
        $output = $this->getTargetFile($file, $postfix);

        $this->log(LogLevel::INFO, "Retrieving the last {lines} from file {file}", [
            'lines' => $this->lines,
            'file'  => $file,
        ]);

        $cmd = sprintf('tail -n %s %s > %s', $this->lines, $file->getPath(), $output->getPath());

        return $this->processFile($file, $output, $cmd, $this->getOption('keepOldFile', true));
    }