From unknown Wed Sep 10 01:58:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#9266 <9266@debbugs.gnu.org> To: bug#9266 <9266@debbugs.gnu.org> Subject: Status: tail -F does not follow through symlinks Reply-To: bug#9266 <9266@debbugs.gnu.org> Date: Wed, 10 Sep 2025 08:58:35 +0000 retitle 9266 tail -F does not follow through symlinks reassign 9266 coreutils submitter 9266 Bart Vanhaute severity 9266 normal tag 9266 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 09 11:41:15 2011 Received: (at submit) by debbugs.gnu.org; 9 Aug 2011 15:41:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqoQc-00011B-9t for submit@debbugs.gnu.org; Tue, 09 Aug 2011 11:41:15 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqhTb-00070a-Lg for submit@debbugs.gnu.org; Tue, 09 Aug 2011 04:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqhSW-0003pK-0T for submit@debbugs.gnu.org; Tue, 09 Aug 2011 04:14:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:43107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqhSV-0003pG-VH for submit@debbugs.gnu.org; Tue, 09 Aug 2011 04:14:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:48150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqhSV-00050l-4X for bug-coreutils@gnu.org; Tue, 09 Aug 2011 04:14:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqhSU-0003p3-7F for bug-coreutils@gnu.org; Tue, 09 Aug 2011 04:14:43 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:47937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqhSU-0003oz-2n for bug-coreutils@gnu.org; Tue, 09 Aug 2011 04:14:42 -0400 Received: by wyi11 with SMTP id 11so212419wyi.0 for ; Tue, 09 Aug 2011 01:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=2q6u/wapzs9T/MyNv6zz52O9LRQbQ6GHfxYhPj1M4jc=; b=Tne1FZtuD9ZCAXSH/r9KyRCR1SOKVAqYDWusKKpsozfUmcUjJ+YucTri5ndLjGR+Gp LtP1F9Y46kK3XPPVw3RHCmTuzQgzHRmd2a7snZXX0fCrV2zI3RnlaBlECKzHezSHBuoV Eh8k0AgiehbtRlR3ky0VLrS3zQWKK4jkPSVJw= MIME-Version: 1.0 Received: by 10.227.173.70 with SMTP id o6mr5431502wbz.38.1312877680791; Tue, 09 Aug 2011 01:14:40 -0700 (PDT) Received: by 10.227.155.3 with HTTP; Tue, 9 Aug 2011 01:14:40 -0700 (PDT) Date: Tue, 9 Aug 2011 10:14:40 +0200 Message-ID: Subject: tail -F does not follow through symlinks From: Bart Vanhaute To: bug-coreutils@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 09 Aug 2011 11:41:12 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) When I use tail -F to follow a file that is a symlink to another file, and that second file gets replaced, tail no longer follows the new file. I am not sure if this scenario is actually supported, but the current behaviour is unexpected to me. Detailed scenario to reproduce: in one terminal: $ ln -s f a $ touch f $ tail -F a in another terminal: $ mv f f.0 $ echo 'hello' > f The output in terminal one will show tail: `a' has become inaccessible: No such file or directory but it will not show the 'hello' message. I am using coreutils version 8.5 on debian sid (linux kernel version 3.0.0), but I noticed the same behaviour in coreutils version 8.9 on opensuse (linux kernel version 2.6.37). greetings, Bart. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 09 12:29:47 2011 Received: (at 9266) by debbugs.gnu.org; 9 Aug 2011 16:29:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqpBa-00029F-Ix for submit@debbugs.gnu.org; Tue, 09 Aug 2011 12:29:47 -0400 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqpBU-000290-CV for 9266@debbugs.gnu.org; Tue, 09 Aug 2011 12:29:45 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id F3D98600D0; Tue, 9 Aug 2011 18:28:30 +0200 (CEST) From: Jim Meyering To: Bart Vanhaute Subject: Re: bug#9266: tail -F does not follow through symlinks In-Reply-To: (Bart Vanhaute's message of "Tue, 9 Aug 2011 10:14:40 +0200") References: Date: Tue, 09 Aug 2011 18:28:30 +0200 Message-ID: <87obzy7dn5.fsf@rho.meyering.net> Lines: 41 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: 9266 Cc: 9266@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Bart Vanhaute wrote: > When I use tail -F to follow a file that is a symlink to another file, > and that second file gets replaced, tail no longer follows the new > file. I am not sure if this scenario is actually supported, but the > current behaviour is unexpected to me. > > Detailed scenario to reproduce: > > in one terminal: > $ ln -s f a > $ touch f > $ tail -F a > > in another terminal: > $ mv f f.0 > $ echo 'hello' > f > > The output in terminal one will show > tail: `a' has become inaccessible: No such file or directory > but it will not show the 'hello' message. > > I am using coreutils version 8.5 on debian sid (linux kernel version > 3.0.0), but I noticed the same behaviour in coreutils version 8.9 on > opensuse (linux kernel version 2.6.37). Thank you for the report. That is indeed a difference in behavior from the way tail works without inotify support. If you want the old behavior (though there is no guarantee this option will be around forever -- it's deliberately not documented), use tail's ---disable-inotify option. Note the three leading '-'s. Another work-around is to use readlink to give tail an absolute name for the file: tail -F "$(readlink -e a)" Regarding tail's behavior change, we'll have to investigate if/how to address it. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 04:51:04 2018 Received: (at 9266) by debbugs.gnu.org; 30 Oct 2018 08:51:04 +0000 Received: from localhost ([127.0.0.1]:53272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHPjs-0002fX-BK for submit@debbugs.gnu.org; Tue, 30 Oct 2018 04:51:04 -0400 Received: from mail-pl1-f169.google.com ([209.85.214.169]:40247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHPjq-0002ex-5A; Tue, 30 Oct 2018 04:51:02 -0400 Received: by mail-pl1-f169.google.com with SMTP id b9-v6so5181451pls.7; Tue, 30 Oct 2018 01:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=+ZWyV1tiCgzDcXilQQ6pOdI8Me1GEQfgYhGy7Vl6u24=; b=an0ns+qhvxM9UO9LpxvzOclkf6u842+6fkyp7N2R0aLxRubwI2wnnLoaDOxzhbi5vN +2aT1/AGgYpCPpHJYnb7gfsaW2C83q3x7n1s/XE/ECHBec+7lGxOrDSoFImMIanMqxXw IDKthPjxd9LlGmQihhTrqFjbTAcTyMSdnaxqlKxFK5IdmssQNoiJII0rCu4MFFLP7L+X rNwUCyKgxbHQfahqltNXuSkzVmvd5nMYLRbm/jfGSorecpHDBAkw8nthDwXfA4UWE54q W505cODJCmMdICm4fTKvxt6Ed4dNxHKDGyeyruUKZsVooWiT+xCI9rOE7SD6P3Ur9AI2 0Jmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+ZWyV1tiCgzDcXilQQ6pOdI8Me1GEQfgYhGy7Vl6u24=; b=a5k39QjRoZrP1jhrdDJXxe9xWxu3fhzrP70rbNhS1WrTmEC/P2BVeDaEiqWHZLBXgd OoCjuCl2jxFXg5D6tUIdpSgKvCdK/J7U5BWHHxVOPiekOxYRR4GqSZcW6tVLb995eefX eTCjU6QbdaqlwDTbcZs66dI2KLVQFD3/1lr7Mql3nHrCX/SwUzfv2+0OiCFK4t9uzv76 9HingA9J0n+MA5YDb0Nbn51CViHrho5kgWxNe01cgy6EPPyusHzuXY6yyZghVRZwAHTw M6gQSr+nTCCN2oUbD55s1TGlI1UznfzMn55eLPBnQwiw8j0B6yWZUTfniTCpXPGlw2oH S9YA== X-Gm-Message-State: AGRZ1gLAv7bvKNasB3MBpMNd24TqBfW9cl9aTll0jQAn3qAOsT2o/3iR WyasvTrTs3snkak1mPuBXUpmWrKjYNg= X-Google-Smtp-Source: AJdET5f1K5LhoTmum14yODCLXjKlO6tXmuw+kE7vAwfRGrpuhyyjh23y435cGnjwkCt2LXdjd4Sudw== X-Received: by 2002:a17:902:5ac9:: with SMTP id g9-v6mr18067116plm.311.1540889455263; Tue, 30 Oct 2018 01:50:55 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id k86-v6sm39826431pfb.167.2018.10.30.01.50.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 01:50:54 -0700 (PDT) Subject: Re: bug#9266: tail -F does not follow through symlinks To: 9266@debbugs.gnu.org References: <87obzy7dn5.fsf@rho.meyering.net> From: Assaf Gordon Message-ID: <9cf2bcf0-e732-8198-ca80-d8592474979e@gmail.com> Date: Tue, 30 Oct 2018 02:50:52 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <87obzy7dn5.fsf@rho.meyering.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 9266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 9266 notabug close 9266 stop (triaging old bugs) On 2011-08-09 10:28 a.m., Jim Meyering wrote: > Bart Vanhaute wrote: > >> When I use tail -F to follow a file that is a symlink to another file, >> and that second file gets replaced, tail no longer follows the new >> file. I am not sure if this scenario is actually supported, but the >> current behaviour is unexpected to me. > Thank you for the report. > That is indeed a difference in behavior from > the way tail works without inotify support. > > If you want the old behavior (though there is no guarantee this > option will be around forever -- it's deliberately not documented), > use tail's ---disable-inotify option. Note the three leading '-'s. with no further comments in 7 years, I'm closing this bug. -assaf From unknown Wed Sep 10 01:58:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Nov 2018 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator