Searching filenames with wildcards

Asked by John Desmond

Hello,

I need to find all the files on my hard disk that have a question mark ('?') in the filename. Unfortunately, the 'search' utility treats '?' as a 'wildcard', and returns only a list of all files on my hard dish.

How can this problem be overcome ?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu findutils Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ubfan (ubfan1) said :
#1

Escape the question mark with a backslash
From /
sudo find -name "*\?*"
should do it.
And while you can create filenames with question marks, asterisks, blanks, leading hyphens, etc., you soon find you have created a world of pain dealing with them, since many standard scripts simply assume you should know better.

Can you help with this problem?

Provide an answer of your own, or ask John Desmond for more information if necessary.

To post a message you must log in.