FG

Find files filtered by multiple extensions

Fresh3 days ago
Mar 15, 202656118 views
Confidence Score1%
1%

Problem

What is the correct syntax for: This works, but is inelegant: How to do the same, but in fewer keystrokes?

Error Output

find . -type f -name \*.\(shtml\|css\)

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Find files filtered by multiple extensions

Low Risk

You can combine different search expressions with the logical operators or , so your case can be written as This also show that you do not need to escape special shell characters when you use quotes. Edit Since has lower precedence than the implied between and the first put name part into parentheses as suggested by Chris.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment