ok i want to make a script that a cronjob will activate at 0600 hours every day (4 hours before a sutdown -h now saves the server from the major heat of the sun
)
what i want it to do is ;
scan a specific folder and all the subfolders
move any folders and files that are over 45days old to a different hard drive (which is mounted as drive2 in my users folder)
it needs to preserve the filing structure (so for example say /data/bills/edf.pdf was 46days old it would move the folder to /drive2/data/bills/edf.pdf)
if it finds empty folders it needs to delete them
i then want it to scan the second hard drive for any files over 200 days old and delete them (thats a scary bit cos if i do that wrong all of my files go bye bye!)
im thinking this is possible but i have no idea where to even begin!