This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

'Tail' bug linked to file size


I found that when a file has a size of 11265 bytes, the 'tail' command
ignores the last line of the file.

Here's an example:
I created a text file of 11264 bytes long (two lines of 'x' actually), run
the two commands below,
then added one character to the first line, saved the file, run the
commands again, added another
character and issued the commands again.  Here's the result:

bash.exe-2.02$ ls -l tmp2 ; tail -1 tmp2
-rw-r--r--   1 544      everyone    11264 Jul  5 10:07 tmp2
xx
bash.exe-2.02$ ls -l tmp2 ; tail -1 tmp2
-rw-r--r--   1 544      everyone    11265 Jul  5 10:08 tmp2
bash.exe-2.02$ ls -l tmp2 ; tail -1 tmp2
-rw-r--r--   1 544      everyone    11266 Jul  5 10:08 tmp2
xx
bash.exe-2.02$ tail --version
tail (GNU textutils) 1.22

The script above shows that when the file is exactly 11265 bytes long, the
last line is no longer displayed by the 'tail' command.

Yours.

Denis Ballant

Environment:
  Cygwin-b20
  WinNT 4.0

(See attached file: cygcheck.out)

cygcheck.out

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]