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
Post a Comment