Hya,
Question
Why do these two commands return different result?
Code:
>find /common -name lost+found -prune -or -name fileToFind
/common/lost+found
/common/fileTofind
>
and
Code:
>find /common -name lost+found -prune -or -name fileToFind -print
/common/fileTofind
>
man page reads (man find)
Quote:
If the expression contains no actions other than -prune, -print is performed on all files for which the expression is true.
|
My system
Debian wheezy, AMD64 current. Version of find is 4.4.2. The directory /common is nfs mounted. Filesystem is EXT3.
My guess
My guess, (obviously incorrect) was that "-print" would be performed regardless of its existance at the end of command line. (commands after -or)
Closing remark
Thank you for your reading my post. Have a nice day!
cheers