HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   script problem (http://www.howtoforge.com/forums/showthread.php?t=47617)

admins 28th July 2010 21:19

script problem
 
Hi all

I've the backupscript of franz on my server. My problem is now, that i couldn't enable, that the script delete backups wich are older than ...

How could I delete folders and files on the path /backup if they are older than a month easy per script?

Thanks
admins

falko 29th July 2010 16:28

Take a look at the find command:
Code:

man find
The /usr/local/sbin/mysqlbackup.sh script on http://www.howtoforge.com/back_up_my..._interruptions has an example how to put this to use. :)

Franz 29th July 2010 16:45

Quote:

Originally Posted by admins (Post 234996)
Hi all

I've the backupscript of franz on my server. My problem is now, that i couldn't enable, that the script delete backups wich are older than ...

How could I delete folders and files on the path /backup if they are older than a month easy per script?

Thanks
admins

HI,
I'm glad somebody use my script

command is:

find ... -mtime +10 ..

it delete files older then 10*24h+24h
so it is 11 days


All times are GMT +2. The time now is 06:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.