Files that require administrative rights are also deleted.
I use this rule to delete all log files in the folder “/ Library / Logs” that are older than 20 minutes.
- Code: Select all
If all of the following conditions are met
Date created is not in the last 20 minutes
Any File
Do the following to the matched file or folder:
- Code: Select all
Run shell script embedded script
Embedded script:
- Code: Select all
#!/bin/bash
Sudo -S <<< “your password” rm -rf “$1”
Use at your own risk