FG
💻 Software

How to list all source files (*.c, *.cpp, *.h)

Fresh7 days ago
Mar 15, 202670656 views
Confidence Score0%
0%

Problem

I'd like to find source files (*.c, *.cpp, *.h) that contain in Linux/MinGW/Cygwin, and recursively in all sub directories. My basic idea is using and . However, building a regular expression that can check given file name is either *.c, *.cpp, or *.h isn't easy. Could you help me out?

Error Output

find

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to list all source files (*.c, *.cpp, *.h)

Low Risk

This should work:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment