Right at the bottom of the find
manpage is the following gem:
NON-BUGS
$ find . -name *.c -print
find: paths must precede expression
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
This happens because *.c has been expanded by the shell resulting in find actually receiving a
command line like this:
So *.css
was apparently expanded by Bash to style.css
becasue that file exists in the current directory. Always escape *
asterisks in find
!
$ find . -name \*.css
./style.css
./view/css/consultation.css
./view/css/lib/jquery.mCustomScrollbar.css
./view/css/lib/normalize.min.css
./view/css/lib/swiper.min.css
./view/css/style.css
./view/css/jquery.scombobox.min.css
./view/css/page-content.css