Fix Permissions, Find, Loop

#1
Hi,

I am a novice and trying to write a unix script to search a folder and fix the permissions on every file and folder changed in the last day or week.

I have this so far ... guidance please :)

Thank you,

for line in "find /Users/admin/Desktop/SAM -mtime -1"; do
chmod -R u+r+w+x,g+r+w-x,o+r+w-x $line;
done
 
Last edited:
Top