/ Published in: Bash
This a Bash one-liner script that will automatically delete files older than 14 days in given directory whose name pattern matches the pattern given to find. The script will need to be put on a cron schedule in order to automatically execute the file deletions. The " in the code below should be replaced by the desired number of days.
Expand |
Embed | Plain Text
#!/bin/bash /usr/bin/find /home/content/b/i/n/binaryprojects/html/jerryv0824/backpageEscorts/log_files/ScrapeBackpageLog* -type f -mtime +<X> -exec /bin/rm {} \;
You need to login to post a comment.
