I gave two commands such as
find / -name "*.txt" -or -type f -print |wc -l
output: 1270
find / -name "*.txt" -or -type d -print |wc -l
output: 1305
why does it so? The output should be same, as I am using an OR operator.
but if 1st condition is true it will not go for the next one, right? so in that case both result will be same because both commands 1st condition is same and true.
find
command does not know a primary operator named-or
. – schily Dec 17 '19 at 11:16find
does know-or
on my system. The manpage tells me that is not POSIX compliant, though. – markgraf Dec 17 '19 at 12:38