Here is the script
#!/bin/bash
find /mnt/blah/DB/* -mtime +65 | xargs rm -Rf "{}" \;
I have also tried the following, but neither works and both get the error as per the title.
find /mnt/blah/DB/* -mtime +35 -exec rm {} \;
All help greatly appreciated.
Just drop the *
and do:
find /mnt/blah/DB -mtime +35 -type f -exec rm {} \;
Listing only the top level directory of the directory tree you want to operate on will be sufficient.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With