Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 545 Bytes

find-all-files-with-a-specific-extension-with-fd.md

File metadata and controls

24 lines (17 loc) · 545 Bytes

Find All Files With A Specific Extension With fd

The best way with fd to match on files with a specific extension is to use the -e flag.

Here is how you'd find all .ts files:

$ fd -e ts

You can use the flag multiple times to specify multiple file extensions. This will turn up all TypeScript and JavaScript files:

$ fd -e ts -e js

Alternatively, you can use regex in the filename pattern to match on several file extensions like so:

$ fd '.*\.(js|ts|jsx|tsx)$'