I then tried various sorts of C-h and websearch, without success.
Please check the manual first! (or second, after docstrings) (eshell) Dollars Expansion:
Eshell has different ‘$’ expansion syntax from other shells. There are
some similarities, but don’t let these lull you into a false sense of
Returns the output of ‘...
To answer your question about find-name-dired, according to its manual page (C-h f find-name-dired):
The default command run (after changing into DIR) is
find . -name 'PATTERN' -ls
See ‘find-name-arg’ to customize the arguments.
If you go to find-name-arg manual page, you get:
find-name-arg is a variable defined in ‘find-dired.el’.
Its value is "-...
After doing some googling for the Linux find parameters and looking at the find-dired function, I came with these two functions that seem to work.
Not sure if this is the optimal way, but at least they have the effect I desired:
(defun find-dired-by-date (dir args)
(interactive (list (read-directory-name "Run find in directory: " nil "" t)
Do you get the expected behavior under emacs -Q? It's possible you've disabled case-insensitivity.
Without knowing your arguments to find-name-dired (you should add them to your question) it's hard to say. If you included the double quotes, Emacs will escape them and find will look for files that include them. Based on your output that ...
This really has nothing to do with find-name-dired.
This is about Q in Dired buffers (including from find-name-dired).
Q is dired-do-find-regexp-and-replace. That command treats your first input pattern as a regexp. And . in a regexp matches any character except newline.
What you want to use, instead of .value, is [.]value. That is, you want a pattern ...
@phils answered the question. This is just to say that the version of find-grep-dired in library find-dired+.el provides a bit more than the vanilla version:
It has two optional args, DEPTH-LIMITS and EXCLUDED-PATHS.
The interactive spec uses read-from-minibuffer, read-file-name, dired-regexp-history and find-diredp-default-fn.
find-grep-dired is an ...
The following does that and presents the results as a dired buffer:
You'll also want to know about:
(which doesn't support the -l option to grep, but is usually what I want from a recursive regexp search.)
You can use the ls command of the built-in eshell for listing the files with some predefined depth.
You have to specify the depth by the right number of concatenated file name generator expressions */.
(eshell-command-result "ls /usr/share/emacs/26.1/*/*/*/*/*/*(.)")
The appended modifier (.)...
Library find-dired+.el can help with this. C-h f find-dired:
find-dired is an interactive compiled Lisp function in
(find-dired DIR ARGS &optional DEPTH-LIMITS EXCLUDED-PATHS)
Run find and put its output in a buffer in Dired Mode.
Then run find-dired-hook and dired-after-readin-hook.
The find’ command run (after ...
The elgrep-search command has options :mindepth and :maxdepth. Elgrep is available via package-install from the melpa package archive (instructions how to add melpa to package-archives can be found on the melpa "Getting Started" page).
You can use elgrep as follows to get a list of matching file names of a specific depth. In the example I search in my HOME-...
If you use library find-dired+.el then you can do the date part using command find-time-dired:
find-time-dired is an interactive compiled Lisp function.
(find-time-dired DIR MIN-TIME MAX-TIME &optional DEPTH-LIMITS
Find files in directory DIR newer or older than a timestamp.
The output is shown in a Dired buffer.
I solved the problem by defining this function + shortcut:
(defun find-in-current-location ()
(find-dired dired-directory (concat "-iname \"*" (read-from-minibuffer "Search for: ") "*\"")))
(global-set-key (kbd "C-c f") 'find-in-current-location)
OK, found the problem: I also had to set shell-file-name to something other than /bin/sh, because Ubuntu ships with Dash as sh and Emacs relies on non-standard GNU features present in Bash, but not Dash.