aboutsummaryrefslogtreecommitdiff
path: root/tail.c
diff options
context:
space:
mode:
Diffstat (limited to 'tail.c')
-rw-r--r--tail.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tail.c b/tail.c
index 4fe92ba5e..90cc2a6ef 100644
--- a/tail.c
+++ b/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]);