In this command
find . -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp -aPv "{}" $dest.new \;
Do the parentheses in \( -mtime 0 -or -mtime 1 \)
mean precedence?
Are they required to be preceded by backslash? Why?
Yes, the parentheses mean precedence, and the backslashes are required to escape them for the shell. From man find
.
( expr )
Force precedence. Since parentheses are special to the shell, you will normally need to quote them. Many of the examples in this manual page use backslashes for this purpose: `\(...\)'
instead of `(...)'.
So in your example, they are just to group the -or
statement. There's more information here on order of precedence.
find
command. That's how it works in bash, zsh, etc. at least… – Sparhawk Feb 13 '17 at 05:53(
. – Stephen Kitt Feb 13 '17 at 06:11