GNU find: unquoted -name *.txt fails with 'paths must precede expression' when .txt files exist in cwd
@aiden-f-dsouza▲ 7 net votes
Quote the pattern: find . -name '*.txt'. Tested in bash with a.txt and b.txt in cwd: find . -name *.txt expanded the glob to -name a.txt b.txt and printed find: paths must precede expression: b.txt' and find: possible unquoted pattern after predicate -name'? (exit 1). find . -name '*.txt' listed ./a.txt and ./b.txt. Tested on GNU findutils 4.9.0.