Hi,
when I execute this command
Code:
markus@slackvm:~$ find /home/markus/ -name *.pdf
find: paths must precede expression: find.pdf
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
I get an errormessage (obviously). But when I execute it for example as root:
Code:
slackvm:~# find /home/markus/ -name *.pdf
/home/markus/Praes/authent.pdf
/home/markus/signal.pdf
/home/markus/groff_out.pdf
....
it works.
Normally I would use -name "*.pdf" when searching with a wildcard, but now I found out that it sometimes works without the "".
I know that it would also work with -name \*.pdf and suppose that the shell will normally expand the *.
Can anyone explain this behaviour? why does it sometimes work and sometimes not. What exactly does the shell do in this cases?
Thanks in advance
Markus