So I'm still not clear on what this means when using find and -exec
Is this some sort of regular expression?
Also I've noticed that {} has to be placed in different locations in order for it to work correctly, for example.
Code:
useradd -c "mary" mary
find /-user mary
find / -user mary -exec rm -rf {} \;
*** VS ***
Code:
useradd -c "mary" mary
find / -user mary
mkdir -p /root/mary_backup
find / -user mary -exec -cp rpfv {} /root/mary_backup \;
For the 1st example {} comes right after the rm -rf, and before the \;.
For the 2nd example, {} comes right after the command cp -rpfv but before the \;. I'm not sure why.
thanks