[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SEEK_HOLE defined but useless on linux-3.4+/ext4 [Re: small ascii fi
From: |
Martin Carroll |
Subject: |
Re: SEEK_HOLE defined but useless on linux-3.4+/ext4 [Re: small ascii files can be sparse |
Date: |
Wed, 01 Aug 2012 10:28:43 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120717 Thunderbird/13.0 |
Hi Paul,
> The same idea would apply to other tools that
> want to do something special for binary versus
> text files.
The problem, as I'm sure you know, is that unix intentionally
does not differentiate ascii from binary files, and I'm not sure
the tools should either.
> If I type 'grep -rw 'open' *', I don't want to see
> all the strings containing 'open' in random *.o files
> that happen to be lying around
Why do you prefer
Binary file matches
over
[binary data]an occurence of open[binary data]
[binary data]another occurence of open[binary data]
The latter output is more in keeping with unix philosophy:
You asked to see occurrences of "open" in this file, so here
they are. If you don't want to see all those occurrences,
then type:
grep -r open * | fgrep -v '[binary data]'
mar