[linux-baslangic] Re: Yedek alma ?

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Ismet Sonmez (isonmez@bsy.com.tr)
Date: Mon 19 Apr 2004 - 09:33:16 EEST


> son 10 gun icindeki dosyalari siler isinize yarar mi?

#!/bin/bash
dizin=/mnt/tools/apache
yedekdizin=/home/ismets/yedek
tarih=$(date +%Y%m%d%H%M)
oncekitarih=$(date --date='1 days ago' +%Y%m%d)
echo $tarih
if [ -d $dizin ]; then
  if [ ! -d $yedekdizin ]; then
    mkdir -p $yedekdizin
  fi
  tar czf $yedekdizin/yedek-$tarih.tar.gz $dizin
  find $yedekdizin -name "yedek-$oncekitarih*.*" -exec rm '-f' {} \;
fi

bu şekilde yaptım güzel çalışıyor. bu benim scriptim aldu!!!

İiy Çalışmalar

---
linux-baslangic listesinden cikmak ve tum listeci islemleri icin
http://liste.linux.org.tr/ adresini kullanabilirisniz.
Bu listeden cikmak icin
<a href="mailto:linux-baslangic-request@liste.linux.org.tr?Subject=unsubscribe"> tiklayiniz</a>


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.