From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 4 01:17:33 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70F8A623 for ; Wed, 4 Feb 2015 01:17:33 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 4AE8FCCC for ; Wed, 4 Feb 2015 01:17:32 +0000 (UTC) Received: from [192.168.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 771F192471 for ; Wed, 4 Feb 2015 01:17:31 +0000 (UTC) Message-ID: <54D17336.3070500@freebsd.org> Date: Tue, 03 Feb 2015 20:17:42 -0500 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: OT: tail nuance References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="taxCfKm5XirTp7fJAVed7SgHpmIWc63r0" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 01:17:33 -0000 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--