[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Finding files in a directory tree
From: |
Gerald . Jean |
Subject: |
Finding files in a directory tree |
Date: |
Thu, 14 Nov 2002 09:47:31 -0500 |
Hello,
I have been using Emacs for quite some time and each time I need to find
where, in a directory tree, are located some file(s) I have to go back to
MS Explorer, which is a pain if I want to edit the file(s). I now know
that the function to do that is "find-name-dired", but I can't figure out
how to use it. The documentation says:
find-name-dired is an interactive compiled Lisp function in `find-dired'.
(find-name-dired DIR PATTERN)
Search DIR recursively for files matching the globbing pattern PATTERN,
and run dired on those files.
PATTERN is a shell wildcard (not an Emacs regexp) and need not be quoted.
The command run (after changing into DIR) is
find . -name 'PATTERN' -ls
and if I look-up the documentation for "find" it says:
find is an autoloaded Lisp function in `cl-seq'.
[Arg list not available until function definition is loaded.]
not documented
All this may be very meaningful for old time Emacs-ers and / or Unix-ers but I
can't figure out how to specify "PATTERN". Specifying the
directory is no problem but stuff like "*.ps", for example, doesn't work for
PATTERN. I allways get the following error message:
c:/latex/:
find . \( -name '*.ps' \) -exec ls -ld {} \;
Fichier introuvable - '*.ps'
find exited abnormally with code 2 at Thu Nov 14 09:44:00
But there is files ending in ".ps" in that directory.
A few examples would be highly appreciated, thanks,
Gérald Jean
Analyste-conseil (statistiques), Actuariat
télephone : (418) 835-4900 poste (7639)
télecopieur : (418) 835-6657
courrier électronique: gerald.jean@spgdag.ca
"In God we trust all others must bring data" W. Edwards Deming
- Finding files in a directory tree,
Gerald . Jean <=