SUMMARY: UNIX fifo file (off the wall)

From: Andy Ford <andy.ford_at_telindus.co.uk>
Date: Wed Apr 28 2004 - 04:33:18 EDT
Thanks to all that responded. 
Suggestions were to use mkfifo or mknod.
Both do exactly the same with (with a few parameters!!)

I tested the fifo as follows

stage 1: mkfifo -m 0666 /tmp/file

stage 2: perl program

#!/usr/bin/perl -w

$count=0;
while(1) {
	open(FIFO, ">/tmp/file")
    	or die "Couldn't open log for writing: $!\n";
    	print FIFO $count."\n";
    	close FIFO;
	$count++;
}

stage 3: tailed the file

result: the file stayed 0 in size and displayed the increasing count
when tailed - perfect

Thanks

Andy



On Tue, 2004-04-27 at 16:26, Andy Ford wrote:
> Is there such a thing on Solaris as a fifo file?
> i.e. a file that will take only one entry so when its tailed, the
> content will scroll up the screen, but the file will not grow in size.
> 
> Thanks
> 
> Andy
-- 

perl -e 'print qq^;@) [###]^^qq^z\.MY{eLQ9^'
in:control developer, Telindus, RG27 9HY
DDI: +44 1256 709211, GSM: +44 7810 636652
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Apr 28 04:33:12 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:31 EST