unix - Find file names using find command and regex, functioning improperly -


we have samba server backing s3 bucket. come find out large number of file names contain inappropriate characters , aws cli won't allow transfer of files. using "worst offender" build quick regex check, tested in rubular against file name try , generate list of files need fixed:

([中文网页我们的团队孙é¹â€“¦]+) 

the command i'm running is:

find . -regextype awk -regex ".*/([中文网页我们的团队孙é¹â€“¦]+)" 

this brings small list of files contain above string, in order, not individual characters contained throughout name. leads me believe either regextype incorrect or wrong formatting of list of characters. i've tried types emacs , egrep seem similar regex i've used outside of unix environment no luck.

my test file name is: this-is-my€™s'-test-_ folder-name. which, according rubular tests, should returned isn't. appreciated.

your regex .*/([中文网页我们的团队孙é¹â€“¦]+) expects 1 of special characters after slash , test file doesn't start 1 of these characters.

you might try more .*[中文网页我们的团队孙é¹â€“¦]+.* instead.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -