#!/usr/bin/perl -w # linux only, # usage tailz filename use strict; my $filename = shift or die "Usage: $0 file \n"; my $byte; # Open the file in read mode open FILE, "<$filename" or die "Couldn't open $filename: $!"; # Rewind from the end of the file until count eol's seek FILE,0, 2; #go to EOF seek FILE,-2048,2; #get last 2k bytes $/=undef; my $tail = ; print "$tail\n"; exit;