How can I search for filenames with special characters? I'd like to search this folder for any files or subfolders that contain special characters. I'd also like to do this with one string if possible so that I'm not performing a single search for every special character.
Via applications > accessories > search for files...
Fold open "Select more options", select "Name matches regular expression" and press the Add button. Now you can fill in a regular expression to match. To use the example of Joris, put
[èö]
in the text box next to the "Name matches regular expression" search option you added, and it will search for all files that containè
and/orö
. You can add as many special characters as you want between the[]
. Oh, and you can leave the main search box at the top empty when searching.i don't know how to do this with the graphical interface.
if you want to use the command line to search for the characters è and ö (as examples), use this:
find * -iregex '.*/.*[èö].*'
this searches your current folder and subfolders for the pattern specified with the regular expressions. because of the the i in iregex the case is ignored, so an È is found. the regex itself is made up of
it's really useful to know regular expressions and the command line for specific questions like yours.