I'm still learning the command line and I am having some trouble fully understanding the use of the wildcard within the find command.I'm working in the directory user/temp and use the find command as followed to find all .txt files: find . -name *.txt -printThis gives me the error:find: unknown primary or operator.I know you need to use single quotes around the *.txt in order to escape the expansion and get your desired result; however, I do not understand why this needs to be done.I read that you have to escape the * so that find does the expansion internally. I am confused because I thought that using single quotes around * will give make the command line not interpret it as a special character, so how does the expansion take place? 
Internal expansion with the find command and wildcard character
shell;find;quoting;wildcards
There are 2 parts here that could try to expand the *: the shell when it's invoking find or find as it's processing/using its arguments.If you do not single quote it, the shell will expand it, so if you have a.txt and b.txt in the current directory your command line would expand fromfind . -name *.txt -printtofind . -name a.txt b.txt -printwhich isn't a valid find commandIf you single quote it, you will tell the shell to leave it alone, so find will get the string *.txt as the argument to -name and it will use it as when matching potential names.