I am looking for a script i can run as a cron job that will create a folder every month and copy files older that 30 days to the folder from a specific directory.
Sorry, Linux isn't really my forte, but usually (ie in other *nixes) you can edit an existing crontab directly using crontab -e (though it's not really recommended, as it's better to copy the crontab with crontab -l > newcron, edit newcron to ensure no errors and then activate it with crontab newcron, but that's getting into deeper water than perhaps you like).
You can pick up specific file extensions in the find by adding -name '*.ext' to the above, ie:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.