* wildcard at the beginning.
find . -path *content/docs/file.xml
The correct way is actually to escape the
find . -path \*content/docs/file.xml
or enclose the pattern in quotes, e.g.:
find . -path "*content/docs/file.xml"
As the man page describes it:
$ find . -name *.c -print
find: paths must precede expression
This happens because *.c has been expanded by the shell resulting in
find actually receiving a command line like this:
find . -name bigram.c code.c frcode.c locate.c -print
That command is of course not going to work. Instead of doing things
this way, you should enclose the pattern in quotes or escape the wild‐
$ find . -name \*.c -print
Although it could work without escaping, there's nothing wrong with doing it the correct way ;)