Is there a way to tail a file by name on Solaris 10? Equivalent to:
tail --follow=name
Manual for tail on solaris shows no such option. Only -f is included and it looks like it follows a file by descriptor.
Is there a way to tail a file by name on Solaris 10? Equivalent to:
tail --follow=name
Manual for tail on solaris shows no such option. Only -f is included and it looks like it follows a file by descriptor.
Your best bet is to install GNU find
either from source or some freeware repository.
If you really want to stick with Solaris 10 bundled find
, you'll need to wrap it with a custom monitoring program that will restart it should the target file is renewed.
According to the GNU
tail
manual,--follows
is the same as-f
:A
-f
option is found in the POSIX description oftail
. However, the--follows
option (which accepts an option value) is not in POSIX. The GNU manual goes on to describe the--follow
option where it differs from-f
:That is,
--follow
provides for reopening the file if the actual file was renamed. POSIX does not appear to address this use case.There is no direct equivalent in Solaris's differences from POSIX (compare
/usr/bin/tail
and/usr/xpg4/bin/tail
in manual).GNU
tail
is part of the coreutils package. You may already have it installed on Solaris 10, in/opt/sfw/bin/tail
. For instance,pkginfo
shows it on my Solaris 10 machine asSFWcoreu
.