View Single Post
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#3
How to find all files containing the letters 'abcd' somewhere in the filename, anywhere on the system (built-in storage and mounted cards):
Open osso-xterm

find / -name "*abcd*" -print

Or, to include only filenames, not directory names:
find / -type f -name "*abcd*" -print

To search for the same, but limiting it to the external card:
find /media/mmc1 -type f -name "*abcd*" -print

To find files in /usr (e.g. /usr/share, /usr/share/doc and so on):
find /usr -name "*GPE*" -print

And so on and so forth. The expression inside the quotes (you need quotes as soon as you start adding wildcards like * for multiple-char match and ? for single-char match and so on) can be e.g.

"ABC*" -- all files starting with the letters ABC, e.g. ABCde but not kABCDE

"file.[c,k,h]" -- files with the follwing names: file.c file.k file.h

"file.{foo,bar}" -- matches file.foo and file.bar

"[A-Z,a-z]bc*" - Files starting with any capital or lower caps letter plus the letters 'bc' plus any character(s).

Hope this helps..
(p.s the -print is actually default when executed from the shell, but it's good practice to include it anyway)
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.