Advertisement
Guest User

Clean daily backup folder

a guest
Aug 30th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.21 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # In the specified folder, look for any folders 7 days old and remove them
  4. # and their contents. Run this job mon-fri via crontab.
  5. find /backup/daily -maxdepth 1 -type d -mtime +7 -exec rm -r {} \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement