2

How to find a file recursively in children? Like the opposite of locate-dominating-file (locate-dominating-file finds file recursively in its parent directory)?

1

2 Answers 2

2

Library find-dired+.el is an extension of standard library find-dired.el. It offers a few find commands that can help:

  • find-dired, find-name-dired, find-grep-dired - Like the standard commands, but with optional args to limit depth and exclude specified paths.
  • find-time-dired - Find files newer or older than a given timestamp.
1

Use find-lisp-find-files from find-lisp.el.

find-lisp-find-files takes two arguments: directory-to-search-from and regexp-of-file-that-you-want-to-search

(defun find-lisp-find-files (directory regexp) ...)

It returns a list of files that match the regexp if found, else it returns nil.

1
  • Could you show a snippet that uses it?
    – ideasman42
    Commented Jul 31, 2017 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.