shell - differences between (find . -name *.cpp) and (find . -name "*.cpp") -


I am confused with these twe sentences:

Find A - Name * .cpp b Find -Name "* .cpp"

Regular expression only works in position B. I am happy to learn from u. Who can explain this, more details Thanks a lot

Your focus is on the parameter here and you go through the "-name" option. We want "Exploration", and not included Shell (BH / TCS / JS) to explain it.

When you insert "* .cpp" , you actually see ".cpp" to see the "Search" program, then ending with ".cpp" Make changes to the list of all files.

When you just *. Cpp , also substitutes the shell search command (which is called) before passing the parameter. What exactly does the order get is not a pattern, but a set of files. Which leads to:

"Find. -name A CPP BCPP ... ZPPP "

Italic files with names are not the parameters of the "-name" flag, thus, unexpected behavior.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -