I need to find files matching the following criteria:
- extension is
md
- within folder
.
and all subfolders - exclude all
node_modules
folders - sort by modified date, latest first across all results
I tried this but I guess my exclude for node_modules
is wrong as I still get results including node_modules
folders when including the fragment \( ! -iname "node_modules" \)
:
find $PWD -name "*.md" \( ! -iname "node_modules" \) -print0 | xargs -0 ls -laht