10-13-04 03:43 PM
We can simulate binary executable files using find + file command as,
for file in `find / -type f -name "*"`
do
if [[ $(file $file | grep -q 'executable') -eq 0 ]]
then
# File is executable
chmod <mod> $file
fi
done
If you want combine few pattern with executable then add as,
$(file $file | grep -q 'executable' | grep -q 'ELF') -eq 0
there.
HTH.
Regards
Muthukumar
__________________
========================================
Muthukumar Kandasamy
Home Page: http://geocities.com/kmuthu_gct/
Mail: zenmuthu@gmail.com / kmuthu_gct@yahoo.com
Phone: +91-94436 62936
========================================
[ Post a follow-up to this message ]
|