diff options
author | Eric Andersen | 2001-06-26 15:07:08 +0000 |
---|---|---|
committer | Eric Andersen | 2001-06-26 15:07:08 +0000 |
commit | ce98c19dfe7bcfb3174c0898f3c001c38c6d44c6 (patch) | |
tree | ab2ca26ce88380246cb7fe9d7f423c85643d6ec3 /coreutils | |
parent | 78b0e379d7c2db84eec34ccd89cf9afb67b94901 (diff) | |
download | busybox-ce98c19dfe7bcfb3174c0898f3c001c38c6d44c6.zip busybox-ce98c19dfe7bcfb3174c0898f3c001c38c6d44c6.tar.gz |
A patch from Erik Meusel <erik@wh58-709.st.uni-magdeburg.de>
to fix the behavior of 'tail -f -n 0 FILE'
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/tail.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c index 4fe92ba..90cc2a6 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c @@ -127,6 +127,10 @@ int tail_main(int argc, char **argv) for (i = 0; i < nfiles; i++) { if (fds[i] == -1) continue; + if (!count) { + lseek(fds[i], 0, SEEK_END); + continue; + } seen = 0; if (show_headers || (!hide_headers && nfiles > 1)) printf("%s==> %s <==\n", i == 0 ? "" : "\n", argv[optind + i]); |