Instead, it returns the following error:find: paths must precede expression: file1.logUsage: 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)
find /var/log/ -type f -name *.log doesn't return list of log files
find
* 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.