ceva de genul
#!/bin/sh
file=/tmp/crap
stat_initial=$(stat $file)
while :
do
sleep 2
stat_now=$(stat $file)
if [ "$stat_initial" \!= "$stat_now" ]
then
echo "stat $file changed"
exit 1
fi
done
On Wed, Nov 12, 2003 at 02:31:54AM -0800, bogdan danu wrote:
> ma interesa cand este accesat un fisier
> si foloseam "watch stat ..."
> intradevar "in fundal" nu a fost cea mai fericita
> exprimare... ideea era ca nu tineam neaparat sa o vad
> in terminal mereu
>
> --- Dan Uscatu <[EMAIL PROTECTED]> wrote:
> > mai bine ne zici ce anume watchuieste comanda watch,
> > si ne gindim cum ai
> > putea sa urmaresti treaba aia.
> > cum rulezi watch "in fundal"... ?
> >
> > > cum as putea executa automat o comanda sub linux
> > in
> > > cazul in care outputul unei comenzi watch lasata
> > sa
> > > ruleze in fundal se schimba?
> >
> >
> >
> > ---
> > Detalii despre listele noastre de mail:
> > http://www.lug.ro/
> >
> >
>
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>
> ---
> Detalii despre listele noastre de mail: http://www.lug.ro/
>
--
___
<o-o> Viorel ANGHEL <vang @ lug.ro>
[`-']
-"-"- In Linux We Trust.
---
Detalii despre listele noastre de mail: http://www.lug.ro/