View Single Post
  #4  
Old 17th April 2010, 23:02
robertlouwen robertlouwen is offline
Senior Member
 
Join Date: Apr 2009
Location: Brielle, Netherlands
Posts: 141
Thanks: 20
Thanked 3 Times in 2 Posts
Default

@ Falko,

At first I thought "stop this is too difficult for me" my second thought was "a challenge"

What you say is make a script and make a cronjob for the script.
From your example I only need
Code:
#!/bin/sh

datum=`/bin/date +%Y%m%d-%H`

for file in "$( /usr/bin/find /home/sqlbackup -type f -mtime +2 )"
do
  /bin/rm -f $file
done

exit 0
and adjust this

Code:
"$( /usr/bin/find /home/sqlbackup -type f -mtime +2 )"
do
  /bin/rm -f $file
to

Code:
"$( /usr/bin/find  /var/lib/php/session -type f -cmin +30 )"
do
  /bin/rm -f $file
Code:
chmod 755 /usr/local/sbin/cleanup.sh
Finaly I create the cronjob
Code:
*/30 * * * * /usr/local/sbin/cleanup.sh &> /dev/null
I will give this a try.

@BorderAmigos,

I am challenged by Falko's suggestion, if I fail I use your cronjob.
__________________
With Respect, Robert
------------------------------------------------
Fedora 15 - ISPConfig v3.0.3.3
On Dell Optiplex GX270, Pentium 4, 2.8 GHz, 1024 Mb
Reply With Quote