/usr/bin/strings: No go on 2.9Gb file: "Value too large for defined data type"

Matthew Palmer mpalmer at hezmatt.org
Wed Aug 10 02:06:42 UTC 2005


On Tue, Aug 09, 2005 at 03:07:40PM +0200, Johan Walles wrote:
> I cannot run "strings" on files larger than 2Gb(?):
> "
> johan at transwarp:~$ du -h core.23485
> 2,9G    core.23485
> johan at transwarp:~$ LANG= strings core.23485
> strings: Warning: could not locate 'core.23485'.  reason: Value too large for defined data type
> johan at transwarp:~$
> "
> 
> I expected "strings" to extract readable strings out of the file, even
> though it's large.

Strings probably hasn't been rebuilt for large file support.  I ran across
this problem for the first time a couple of days ago (funny how that
happens...) and my workaround is thus:

cat core.23485 | strings

Which appears to work quite dandily.  You could wrap that up in a script,
even, maybe call it bigstrings:

#!/bin/sh

cat $1 | strings

And then run "bigstrings core.23485"

- Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050810/34961b3e/attachment.sig>


More information about the ubuntu-users mailing list