About the -print option in find command
Is there a difference between
Code:
find / -iname "*.mp3" Code:
find / -iname "*.mp3" -print I RTFM and could not find any clear explanation regarding -print option, whether it is a default parameter. (Please note that my question is not related to the difference between -print and -print0.) Thanks. |
From the find man page (in the OPTIONS section preamble): "If no expression is given, the expression -print is used".
|
Indeed it is a default and you can omit it, but there are some cases where it is necessary to specify it, for example in conjunction with -prune. The output of the two following commands differs:
Code:
find /home -wholename /home/colucix -prune Code:
find /home -wholename /home/colucix -prune -o -print |
Another example, and a more detailed explanation, can be found at the end of this page:
http://mywiki.wooledge.org/UsingFind |
All times are GMT -5. The time now is 09:33 PM. |