I am trying to find all .yaml
and .yml
I tried
find . -name '*.{yml,yaml}' -exec echo "{}" \;
But no results
Neither in the following way
find . -name '*.yml' -name '*.yaml' -exec echo "{}" \;
Returns nothing.
Is it possible to use the find command to search for both extensions?
With GNU find
find none or one a
:
find . -regextype egrep -regex '.*ya?ml$'
or
find . -regextype egrep -regex '.*ya{0,1}ml$'
See: man find
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With