find: paths must precede expression: 'xxxx'

Solution Verified - Updated -

Issue

  • If there are two or more *.cfg files in the current path, executing the command find / -name *.cfg generates the below error.
# ls
anaconda-ks.cfg  original-ks.cfg test.cfg

# find / -name *.cfg
find: paths must precede expression: original-ks.cfg
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content