bookmark

bash - Intelligent chmod -x for all executable files that actually cannot be executed - Ask Ubuntu


Description

find . -type f -executable ( -exec sh -c 'file -b "$1" | grep -q executable' Test {} \; -o -exec chmod a-x {} \; )

Preview

Tags

Users

  • @analyst

Comments and Reviews