here is a simple script that I don't really understand:
#!/bin/bash
while read s; do
ssh -oStrictHostKeyChecking=no (connection to my servers) 'sudo find /path/to/main/directory -type f -exec chmod 755 {} +'
done < hosts_to_change.txt
without the + at the command it says chmod: missing operand after ‘755’. Could someone explain why I need to use the '+' and 755 is not enough?
man 1 find
,-exec ... {} +
syntax.find
to complain withmissing argument to '-exec'
and never runchmod
in the first place. Oh well, maybe the implementation offind
you're using is somewhat strange.