I want to find all files (in current and all subdirectory) which end in'~' or 'pyc'. To do so I have tried the following find
pattern:
find . -name '*{~,pyc}'
find . -name '{*~,*.pyc}'
but neither list any of the files present in the diectory. Why do these patterns not work? How to do it right?
When using ls
instead of find
(without the quotation mark) I get the expected result (except that ls
only shows the current directory and not all the subdirectories).