Re: [Linux-programlama] k���k bir betik sorunu

---------

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

From: Ozcan GUNGOR (ozcangungor@gmail.com)
Date: Mon 04 Jul 2005 - 16:24:55 EEST


Bir dosya içine klasör isimlerini yazın....
# cat a
/home
/usr

...
KLASOR=`cat a`
 for i in `find $KLASOR -name *-web -type d`
...

Umarım klasör isimleri içinde boşluk yoktur...

On Mon, 2005-07-04 at 06:03 -0700, Mustafa Aldemir wrote:

> teşekkür ederim,
>
> çift tırnak içine alınca çalıştı.
>
> Şimdi şöyle bir değişiklik yapıp sadece belirli
> klasörleri tar'lamasını istiyorum. nasıl
> yapabilirim?
>
> --- Ozcan GUNGOR <ozcangungor@gmail.com> wrote:
>
> > find içindeki *-web'i çift tırnak içine alıp
> > dener misiniz?
> >
> >
> >
> > On Mon, 2005-07-04 at 05:18 -0700, Mustafa Aldemir
> > wrote:
> >
> > > Arkadaþlar merhaba,
> > >
> > > aþaðýdaki kodu yazýp bir dosya olarak
> > kaydettim.
> > > Çalýþtýrmak istediðimde hata veriyor. Yardým
> > edebilir
> > > misiniz?
> > >
> > > # sh /home/musti/betikler/dosya_yedek.sh
> > > find: paths must precede expression
> > > Usage: find [-H] [-L] [-P] [path...] [expression]
> > >
> > >
> > > ---------dosya_yedek.sh---------------
> > > #!/bin/sh
> > > BACKSDIR="/yedek/hosting"
> > > DATE=`/bin/date "+%Y%m%d"`
> > >
> > > mkdir -p ${BACKSDIR}/${DATE}
> > > cd /home/
> > >
> > > for i in `find /home/ -name *-web -type d`
> > > do
> > > tar -cvvf ${BACKSDIR}/${DATE}/${i}.tar ${i}
> > > done
> > >
> > > _______________________________________________
> > > Linux-programlama mailing list
> > > Linux-programlama@liste.linux.org.tr
> > >
> >
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> > > _______________________________________________
> > Linux-programlama mailing list
> > Linux-programlama@liste.linux.org.tr
> >
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >
>
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


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

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.