i need a script that i can have cron run everyday, to move folders within a directory with a date of more than 30 days to another directory.
its important that the script only looks at the folder dates and not whats inside because it will start moving files out of the folders.
i want to keep the amount of orders in our order folder down to increase performance
should look something like this:
find /path/to/orderfolder -d -mtime +30 -exec mv -f {} /path/to/archivefolder \;
i get this response:
find: -d: unknown expression primary
Start Free Trial