SUMMARY: UNIX fifo file (off the wall)
Andy Ford
andy.ford at telindus.co.uk
Wed Apr 28 04:33:18 EDT 2004
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 at sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
More information about the summaries
mailing list