uutils/coreutils

tail --follow=name accepts symlink replacements

开放

#10,328 创建于 2026年1月18日

 (0 条评论) (0 个反应) (0 位负责人)Rust (2,003 个派生)batch import
U - tailgood first issuereported-canonical

仓库指标

星标
 (23,984 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Component

tail

Description

When using --follow=name, uutils tail accepts a file that has been replaced with a symlink and continues tailing the symlink target. GNU tail refuses to follow a path that becomes a symlink, printing "has been replaced with an untailable symbolic link".

Test / Reproduction Steps

cd /tmp && rm -rf tail_test && mkdir tail_test && cd tail_test
echo "original" > testfile

# GNU tail
timeout 2 tail --follow=name testfile &
sleep 0.3
rm testfile && ln -s /etc/passwd testfile
sleep 0.3
# Output: "has been replaced with an untailable symbolic link"

# uutils tail
rm -f testfile && echo "original" > testfile
timeout 2 tail --follow=name testfile &
sleep 0.3
rm testfile && ln -s /etc/passwd testfile
sleep 0.3
# Output: "'testfile' has appeared;  following new file" + contents of /etc/passwd

贡献者指南