bug#5941: tail bug
Tags: notabug
bug#5941: tail bug
Eric Kever writes: > I've created a file 'foo', and used tail -f to follow the changes to that > file. > I then wrote 'test' to the file and saved it, and tail reported 'test', > which is fine. > I then deleted 'test' and saved the file, and tail reported 'tail: foo: > file truncated', which is fine. > I then wrote 'test' again and saved the file, and tail reported 'est' > instead of 'test'. That's not a bug. When you truncated the file you actually wrote a single newline, so the current position became one character into the file. The fact that the next modification overwrote the newline (with `t') wasn't noticed by tail, because it only watches for modifications after the current end-of-file. Try using an editor that actually allows you to write an empty file (or use `> foo' in the shell). Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
bug#5941: tail bug
On 04/13/2010 02:16 PM, Eric Kever wrote: > I've created a file 'foo', and used tail -f to follow the changes to > that file. > I then wrote 'test' to the file and saved it, and tail reported 'test', > which is fine. > I then deleted 'test' and saved the file, and tail reported 'tail: foo: > file truncated', which is fine. > I then wrote 'test' again and saved the file, and tail reported 'est' > instead of 'test'. Which version of coreutils? Which platform? The latest coreutils is 8.4, and there have been some fixes for bugs in tail within the last year. We need more information before we can either repeat this or definitively state that you have encountered one of those already-fixed bugs. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
bug#5941: tail bug
I've created a file 'foo', and used tail -f to follow the changes to that file. I then wrote 'test' to the file and saved it, and tail reported 'test', which is fine. I then deleted 'test' and saved the file, and tail reported 'tail: foo: file truncated', which is fine. I then wrote 'test' again and saved the file, and tail reported 'est' instead of 'test'. It seems that any time the file that tail is following is truncated, tail will miss the first byte of any information that is written to the file after the truncation. -- You've read my email. Windows must restart for the changes to take effect.