Michael Lazin on 17 Jun 2016 08:13:21 -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

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. 

Any help would be appreciated.

On Fri, Jun 17, 2016 at 11:06 AM, Michael Lazin <microlaser@gmail.com> wrote:
I am interested in using the find command to recursively find all non-ascii character named files in a directory.  I found this article in stack overflow:


based on the reported best answer I tried:

find . -type f | grep "[\x80-\xFF]"

this results in the following error:
grep: Invalid range end

I have created a chinese named empty file in my home directory for testing purposes using the touch command.  I would like my find string to find not just chinese, but all non-ascii characters.  Can anyone help me with this?  Thanks

Michael Lazin

Michael Lazin

to gar auto estin noein te kai ennai

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