0

Instead, it returns the following error:

find: paths must precede expression: file1.log
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
d41d8cd98f00b204e9800998ecf8427e  -

Is there something wrong with the command syntax?

(encountered this problem upon trying the accepted answer of this stackoverflow question)

3
  • 3
    '*' is expanded by shell before it is given to find command, see mpi-sb.mpg.de/departments/rg1/teaching/unixffb-ss98/… Thus quote it.
    – jirib
    Commented Oct 11, 2013 at 11:11
  • Thanks, fixed it by enclosing the pattern in single quotations. Commented Oct 11, 2013 at 11:12
  • @silvernightstar While you should generally wait a while before accepting an answer (to allow for people from other time zones to offer answers), do consider upvoting and accepting Jiri Xhichtkniha's answer if you feel the question has been answered to your satisfaction.
    – user
    Commented Oct 11, 2013 at 12:44

1 Answer 1

5

* is expanded by shell before it is given to find command, see A Guide to Unix Shell Quoting. Thus it has to be quoted; use '*' instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .