Date: Tue, 03 Feb 2015 20:17:42 -0500 From: Allan Jude <allanjude@freebsd.org> To: freebsd-hackers@freebsd.org Subject: Re: OT: tail nuance Message-ID: <54D17336.3070500@freebsd.org> In-Reply-To: <CAJfn-RGfUDnD4aqMEnATL%2BV31n9cRHtwU094GDa0JKSx56WMqQ@mail.gmail.com> References: <CAJfn-RGfUDnD4aqMEnATL%2BV31n9cRHtwU094GDa0JKSx56WMqQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --taxCfKm5XirTp7fJAVed7SgHpmIWc63r0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015-02-03 18:44, Paul Halliday wrote: > I figured someone here would likely know the answer to this one. >=20 > On freebsd if I do: >=20 > ~% mkdir dirA > ~% tail -n0 -F dirA/afile.txt > ~% echo test > dirA/afile.txt >=20 >>> test >=20 > ~% mv dirA dirB > ~% rm dirB/afile.txt > ~% mkdir dirA > ~% echo test > dirA/afile.txt >=20 >>> test >=20 > Which is what I would expect to happen. When I do the same test on a > linux box it doesn't report the last echo (or any other redirection to > the file). >=20 > What am I missing? >=20 > Thanks! >=20 Linux's tail is not as featureful -F is just an alias for -f, whereas on FreeBSD tail -F: The -F option implies the -f option, but tail will also check to see if the file being followed has been renamed or rotated. The file is closed and reopened when tail detects that the filename being read from has a new inode number. If the file being followed does not (yet) exist or if it is removed, tail will keep looking and will display the file from the beginning if and when it is created. Some history on the tail(1) command: https://www.youtube.com/watch?feature=3Dplayer_detailpage&v=3Dvm1GJMp0QN4= #t=3D2434 --=20 Allan Jude --taxCfKm5XirTp7fJAVed7SgHpmIWc63r0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJU0XM4AAoJEJrBFpNRJZKf4NYP/R510COPZOrsk//PEGad9OxJ yKD5XgrhAl8RpfhsL9EheUbnY2BWumJorHt97ZnM9H2A9nAAXyhOHSUI3ZLzT2yv RzLF3wAk/bMqB40Zcj/2AKDRO1S7vyh90tqLTaZ4TM2b+D+arwLJGH9Te2nh76qU s9UDyyN25t8uWJ9UzH97NBTjS0GDpscgMwCtW04kJP0X7Y9VwnSAt61SIEDX02Gx IplJoW/EQGyOCAdktxZP6zR8rBEpOVYnpHj6fTSlYC5InZr8ZCudAOz9EgFJFwYb ZYily3f8UQx0Ew9oS3K/9S2LWbTjbDDKK/OzIi5X4e0cfg3NhiKSRotsyA1II/Ot rUwTuwwUTmPsXdPJdn+773p7XKe0R6lejikSHTwUhN1o6EMYWXenJ210gLBAcEdJ /MRHEPI5e86Yykl2ah9FtjoshrTeyycFDxVRkHOAGFUQa5fRcBgpTI/bMcAGHPaH yP/qxsgkGB3xLnPR191CUn7fI9ATbcssQ3u1x1bISV4Ee1cjv+oGzDc7fc4tMT/c ww/eWryGeE9qTFxgZDWdGBTToYOYy0oyXDuZK/6a1lYrJt18UD/v6kufe/NcayHS eQO4rNngOJ/qnV1rEehKRt5y98xh6QR1CDketjVgEs9IwL/GL4aRY0JYcd40Z8U6 3KrBIzFz1kQ1wEAvtTdT =WdFE -----END PGP SIGNATURE----- --taxCfKm5XirTp7fJAVed7SgHpmIWc63r0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54D17336.3070500>