script on changing directory ownership via bash
The syntax of find
is a bit tricky, especially with -exec
.
Try:
find /mnt/mailfolder/ -maxdepth 1 -type d -mtime +150 -printf "%P\n" -exec chown -R oracle:oinstall "{}" \;
The syntax of find
is a bit tricky, especially with -exec
.
Try:
find /mnt/mailfolder/ -maxdepth 1 -type d -mtime +150 -printf "%P\n" -exec chown -R oracle:oinstall "{}" \;