Of these two ways of searching a file recursively in all the subdirectories, which is faster / better ?
find . -regex ".*/.*abc.*"
or
find . | grep ".*abc.*"
|
UNIX file name can generally consist of octets (8-bit bytes), except for 0x00 (NULL) and 0x2F (/). Every other octet is valid. This includes such nice things as 0x0A (newline). Your Your You can use If you want to do some really complicated matching, you may like the |
|||
|
|
|
If you use pattern matching with
|
|||
|
|
|
Note that both commands look for files whose full path contains
In ksh, bash or zsh, you can run |
|||
|
|
find . -type f -iname "*abc*"would work... – Sean C. Sep 12 '12 at 19:38