find [where to start searching from] [expression determines what to find] [-options] [what to find]e.gfind "$MD_DIRECTORY" -name '*.md' -exec echo "File is: {}" \;
By default, find searches recursively to include sub-directories and files too.
Cheatsheet:
Description
Syntax
Search for all files of a pattern
find ./GFG -name *.txt
Placeholder for “current file path of found object” →{}
find "$MD_DIRECTORY" -name '*.md' -exec echo "File is: {}" \;
To run a command after finding a file, use -exec
find [location] -exec \;
To initiate a loop on a $pattern file, without splitting the lines into fields