[clue-tech] clue-tech Digest, Vol 55, Issue 22

chris fedde chris at fedde.us
Mon Oct 18 16:47:00 MDT 2010


I suppose it depends what you mean by binary.  Are you just talking
about anything with the execute bit on? or files that contain non
ascii bytes?  Perl has tests for each of those.

Files that are not executable:

   find2perl /etc/ -type f -! -type x  | perl

Files that do not appear to contain binary data:

   find2perl /etc/ -type f -! -type B | perl

As always YMMV

cfedde



On Mon, Oct 18, 2010 at 3:55 PM, Whiting, Gary
<Gary.Whiting at echostar.com> wrote:
>> Is there a way to pre-filter out all the binary files? Before grep gets to them?
>
>  find /etc -type f
>
> Finds files of type [f]ile. Or xtype depending on how you want to handle links.
>
>
>
> Gary Whiting | Staff Systems Administrator - UNIX
> EchoStar Information Technology
> 100 Inverness Terrace East | Englewood, CO  80112
> (O) 303-706-5607 | (C) 303-229-6114
> Gary.Whiting at echostar.com | http://sats-it
>
>
>
>
> -----Original Message-----
> From: clue-tech-bounces at cluedenver.org [mailto:clue-tech-bounces at cluedenver.org] On Behalf Of clue-tech-request at cluedenver.org
> Sent: Monday, October 18, 2010 3:05 PM
> To: clue-tech at cluedenver.org
> Subject: clue-tech Digest, Vol 55, Issue 22
>
> Send clue-tech mailing list submissions to
>        clue-tech at cluedenver.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://cluedenver.org/mailman/listinfo/clue-tech
> or, via email, send a message with subject or body 'help' to
>        clue-tech-request at cluedenver.org
>
> You can reach the person managing the list at
>        clue-tech-owner at cluedenver.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of clue-tech digest..."
>
> _______________________________________________
> clue-tech mailing list
> clue-tech at cluedenver.org
> http://cluedenver.org/mailman/listinfo/clue-tech
>


More information about the clue-tech mailing list