Syntax for find on Mac OS X
Fresh3 days ago
Mar 15, 20265184 viewsConfidence Score0%
0%
Problem
I have a project directory that contains source code and subdirectories of source code. I want to use the Unix program to search recursively for the names of files of certain extensions. The versions of on Linux and Mac OS X behave differently. How do I write this command so that it will run on Mac…
Error Output
# Works in Linux find . -type f -regex ".*\.\(py\|html\)$" # Neither of these works in Mac OS X find . -type f -regex ".*\.\(py\|html\)$" find . -ty…
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Syntax for find on Mac OS X
Low Risk
Mac OS X uses BSD find and most Linux distributions come with GNU find. I believe you can install GNU findutils onto Mac OS X. I don't have a Mac handy, but I am sure it was available in MacPorts. Looking at the BSD find man page I could make a wild…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix