Solved Finding files with foreign filenames

Hi,

I want to find files with foreign filenames in them, I'm using a regex to find such files with another tool but I don't know how to use them in find.

Here is what I use:

Code:
*\[DE\]*
*\[JP\]*
*\[RU\]*
*\[FR\]*
*\[KR\]*
*\[PL\]*
*\[AU\]*
*\[IT\]*
*[\p{Han}]*
*[\p{Hiragana}]*
*[\p{Katakana}]*
*[\p{Cyrillic}]*
*[\p{Hangul}]*
*German*
*Japanese*
*Korean*
*Spanish*
*Italian*
*Polish*
*French*

Is there a way to find all files including these?
 
You can use something like this using grep(1) (hard to remember the details of find(1) syntax):

find /some/path -type f [-iname '*somefilename*'] -exec [r]grep -i 'LANG' {} \;

However you probably want to script to find all desired languages into the files at one run, unless you prefer to run one by one.

awk(1) would probably be more interesting but I don't know how to do that. :D
 
find /some/path -type f -iname '*polish*'

Using -iname (instead of -name) will search with case insensitive.
 
That's the easy one :)

Though, I found what I wanted.. While regular find doesn't find what I want fd-find via package manager is running more like gnu-find.

So a code like this works: fd '.*[\p{Han}\p{Katakana}\p{Hiragana}\p{Hangul}\p{Cyrillic}].*' -x rm {} \;
 
Back
Top