Page 1 of 1

Delete files without a trash

PostPosted: Wed Oct 28, 2020 3:21 pm
by Ni€ls
This rule deletes all files in a folder without moving them to the trash.
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