Attached is a patch so "look" will accept files larger than INT_MAX on
64 bit architectures.

The original debian/patches/look.diff allows look.c to compile on Debian
by defining SIZE_T_MAX as INT_MAX.

But it should have defined SIZE_T_MAX as SIZE_MAX.

SIZE_MAX is defined in stdint.h which wasn't included before, so this
patch adds an #include <stdint.h>

stdint.h should be available on Debian since it is provided by package
libc6-dev.

I just learned about "look" last week, as a utility that does a binary
search on sorted files.

I tried it at work to look through a 33G log file.

Instead of grep '^2011-05-27 11:32' some.log # waiting minutes

look '2011-05-27 11:32' some.log # hoped it would be faster than grep, instead 
I got
look: some.log: File too large # :(

I found out about look via

http://www.reddit.com/r/blog/comments/fjgit

and "look -b" sounds like the appropriate tool but fails unreasonably on
64 bit architectures.

** Patch added: "Allow "look" to work on large files on 64bit machines."
   
https://bugs.launchpad.net/ubuntu/+source/bsdmainutils/+bug/510613/+attachment/2145338/+files/look.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/510613

Title:
  look(1) can't open bigfiles

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to