Well i looked up some other scripts in hopes to get close too what i am looking for. so here is what i found and have.
=====================================================================
#!/bin/bash
# ip-cam-ftp-cleanup.sh
# _______ __ __ ________ _________
# / ___ \ | | | | | __ | /
# \ \ \_/ | | | | | | | | |
# \ \ | | / | | | | | |
# \ \ | |/ | | | | | | snowcatman
# \ \ | | | | | | |
# \ \ | /| | | | | | |
# _ \ \ | / | | | | | | |
# / \__/ / | | | | | |__| | |
# \______/ |__| |__| |________| \_____________
#
# ====================================================================
# modified script
#log this to a the local BASH file directory
# logger -s "foo bar" 2>> ~/bin/ip-cam-ftp-cleanup-log1.txt
# >>$ip-cam-ftp-cleanup-log2.txt 2>&1
#ip-cam-ftp-cleanup.sh >> ~/bin/ip-cam-ftp-cleanup-log3.txt 2>&1
#------------
#write_log()
#{
# while read text
# do
# LOGTIME=`date "+%Y-%m-%d %H:%M:%S"`
# # If log file is not defined, just echo the output
# if [ "$LOG_FILE" == "" ]; then
# echo $LOGTIME": $text";
# else
# LOG=$LOG_FILE.`date +%Y%m%d`
# touch $LOG
# if [ ! -f $LOG ]; then echo "ERROR!! Cannot create log file $LOG. Exiting."; exit 1; fi
# echo $LOGTIME": $text" | tee -a $LOG;
# fi
# done
#}
#------------
#need to add a indicator for how long the proccess might take.
# Show were trash can is.
TRASHCAN=~/.local/share/Trash/files
# Send to TrashCan
# find ~/dadscam/* -mtime +2 -exec mv {} $TRASHCAN \;
find ~/dadscam/* -mmin +2880 -exec mv {} $TRASHCAN \;
# Send to Death
# find $TRASHCAN* -mtime +3 -exec rm {} \;
find $TRASHCAN* -mmin +4320 -exec rm {} \;
# ====================================================================
#
# +-+-+-+-+-+-+-+
# |c|r|e|d|i|t|s|
# +-+-+-+-+-+-+-+
#
http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/# My name is Shawn Quintal A.K.A. Online SnowCatMan
#
[email protected]# This is my first script.
# Using native to ubuntu 14.04
# This is a BASH script
# I got the examples from
http://gotbletu.blogspot.com/ |
http://www.youtube.com/user/gotbletu timebomb.sh
#
=============================================================================
i am looking to get the -mtime to hours if possible i thought i saw some were with a like
24h or something??? ok modified this found -mmin +300 it workes so far.