As a rookie question, I wondered how you'd either make a directory or move contents of old folder to another - as a user. I know policies run as root but if I want it to do something in the users directory - how would I execute that?
Getting the user, I can do: curUser=$( stat -f%Su /dev/console )
If I want to run something like "mkdir foo" shouldn't it be something like:
su - "$curUser" -c 'mkdir "/Users/$curUser/foo"'
Although I try that as a policy for my own computer and it doesn't do anything.
The goal being to put the contents of one directory in another so their old data isn't overwritten
