• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

102
Views
find files matching several patterns in bash

I am trying to find all the files in a folder that ends with any of this expressions:

"00.png" or "25.png" or "50.png" or "75.png"

I am using the command

find . -type f -name '(*00.png|*25.png|*50.png|*75.png)'

with no success, what is the correct way to do it?

about 3 years ago · Santiago Trujillo
2 answers
Answer question

0

Without using any regex you can use:

find . -name '*[05]0.png' -o -name '*[27]5.png'

If you are really keen to use regex then use this gnu find command:

find . -regextype egrep -regex '.*/([05]0|[27]5)\.png$'
about 3 years ago · Santiago Trujillo Report

0

You can use regex option of find command :

find . -type f -regextype posix-extended -regex '(.*00\.png|.*25\.png|.*50\.png|.*75\.png)'
about 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error