[ale] Stumped-

Dennis Ruzeski denniruz at gmail.com
Thu Mar 11 11:08:16 EST 2010


This looks pretty promising- Forgot about stat...

On Thu, Mar 11, 2010 at 10:55 AM, Dave Weiner <davew at coyotetechnical.com> wrote:
> Dennis Ruzeski wrote:
>> The direction  I've been going in is to do something like this-
>>
>> for dir in `ls /client`
>> do diff -s $dir/images $dir/movies |grep ^F |xargs ls -l
>> done
>
> I would take a different, not quiet as brute force approach as this,
> totally untested and off the top of my head.  Watch for line wraps.
>
> for dir in /client/*
> do
>  cd $dir/images
>  for file in *
>  do
>  if [ -f ../movies/$file ]
>  then
>   if [ `stat --format="%s" $file` -ne `stat --format="%s"
> ../movies/$file` ]
>   then
>    #do something here
>   fi
>  fi
>  done
>  cd ../movies
>  for file in *
>  do
>  if [ -f ../images/$file ]
>  then
>   if [ `stat --format="%s" $file` -ne `stat --format="%s"
> ../images/$file` ]
>   then
>    #do something here
>   fi
>  fi
>  done
> done
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



More information about the Ale mailing list