I have a process which moves files from our EC2 server to s3, we're not sure why but it stores them in /tmp whilst moving them, but for some reason it also leaves them there once the process has completed.
This would be fine if tmpwatch deleted them, but it doesn't. They go into a folder called mixtape2 so the location is /tmp/mixtape2 here is my tmpwatch now, could someone help as to what I need to add change to make this happen to files a day old? (or if its possible to delete them from /tmp as soon as they are moved)
#! /bin/sh
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix \
-X '/tmp/hsperfdata_*' -a -f 1d /tmp
/usr/sbin/tmpwatch "$flags" 1d /var/tmp
/usr/sbin/tmpwatch "$flags" -a -f 1d /tmp/mixtape2
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
if [ -d "$d" ]; then
/usr/sbin/tmpwatch "$flags" -f 1d "$d"
fi
done