Michael Lazin on 17 Jun 2016 08:23:44 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] find all files with non ascii characters in a directory


Thanks Rich, that's the hint I needed, I got it working with:

~$ find . -type f | grep -P '[^\x00-\x7f]'
./潍敤⠠㜸ㄬ㘰ㄬ㈲㈬㔲㈬㜰㜬⸩
./.PlayOnLinux/configurations/icones/Marine Malice 2 : Le Mystère de l'Ecole Hantée

It found both files!

On Fri, Jun 17, 2016 at 11:16 AM, Rich Freeman <r-plug@thefreemanclan.net> wrote:
On Fri, Jun 17, 2016 at 11:13 AM, Michael Lazin <microlaser@gmail.com> wrote:
> I see that I was missing the -P to indicate perl regex.  I subsquently tried
> this:
>
> find . -type f | grep -P "[\x80-\xFF]"
> ./.PlayOnLinux/configurations/icones/Marine Malice 2 : Le Mystère de l'Ecole
> Hantée
>
> It found a french named file I didn't even know I had but ignored the
> chinese named test file completely.  It is imperative that it also find
> chinese characters.
>

I'm not a regexp/perl expert, but I suspect that this is detecting
extended ascii characters, not non-ascii characters.  You need to
search for unicode/etc as well.

--
Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug



--
Michael Lazin

to gar auto estin noein te kai ennai
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug