I'm running an unnecessarily complex script which looks similar to this command:
find /home/user/videos/*.avi -mtime +0 -exec mv -f {} "/home/nb/videos/1 day old" \;
And then I run the same command, but this time, from the "1 day old" folder into a "2 days old" folder. And some more commands keep repeating all the way up to 7 days old! So each day, files from the previous "X days old" folder move into the next day up's folder.
I'm basically trying to organise files automatically, running in cron, to move files older then X days into the correct folder. It's inefficient, but I do need this to happen. Is there any easier, more efficient way?
Once it gets to the 7 days old folder, I have the final command which removes files older than 7 days from that last folder.