You can use -exec
along with find
. Something like:
find /mnt/STStorage/ -type d -mtime +14 -exec mv {} /mnt/LTStorage/ \;
-type d
will ensure only directories are moved.
Another option is to use xargs
find /mnt/STStorage/ -type d -mtime +14 | xargs -I '{}' mv {} /mnt/LTStorage/
Update:
To add what is being moved, you can set the verbose
mode option for mv
find /mnt/STStorage/ -type d -mtime +14 -exec mv -v {} /mnt/LTStorage/ \;
Since this will print everything on standard out. You can redirect it to a log file.
find /mnt/STStorage/ -type d -mtime +14 -exec mv {} /mnt/LTStorage/ \; > /mnt/STStorage/log.file
For emailing you can do something like -
uuencode /mnt/STStorage/log.file /mnt/STStorage/log.file | mail -s "this is my subject line" chip@email.com