you can look into using the find command with the options -mtime -atime and -ctime. Here are the descriptions for each as stated in Sams Teach Yourself Shell Programming in 24 Hours.
-mtime - fines files last modified more than, exactly, or fewer than n days ago
-atime - find files last accessed more than, exactly, or fewer than n days ago.
-ctime - find files that were last changed more than, exctly, or fewer thatn n days ago.
you could probably do something like find -{c/m/a}time expression -exec mv foo new destination in a loop to accomplish this. You could also look into xarg to execute the command after you get the list of file names to move. something like find (options and parameters) | xarg mv (options and parameters) check out man for find and xarg for more info. And by the way you should have posted this in the programming section and might have gotten more reponses; however don't double post. If a moderator sees this they will probably move it to programming forum anyways.
|