[Gllug] Match optional character in filename expansion with find
Sunny Aujla
sunnyfedora99 at googlemail.com
Thu Feb 16 15:08:21 UTC 2012
On Thu, Feb 16, 2012 at 2:57 PM, gvim <gvimrc at gmail.com> wrote:
> In the `find' command how do I match an optional end character, eg. match
> all files ending in 'html' or 'htm'?
>
> find . -name '*.ht{m,ml}' -print
This is how I would do it:
find /path/to/dir -type f \(-name "*.html" -o -name "*.htm" \)
Quick and Easy!
Sunny
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list