>_ IzzyLab

Topic breakdown

find can do more than print paths — it can run an arbitrary command on each file it finds: the {} placeholder substitutes the path, and the terminating character selects the mode — one invocation per file, or grouping several paths into a single invocation (more efficient). The execute permission in Linux is a separate permission bit, added with chmod in symbolic notation for the desired category (owner/group/others). Here the combination of searching by name and adjusting permissions via -exec solves the task in a single pass.

What's checked

  1. all .sh files have the u+x permission
  2. the other permissions are unchanged

What it looks like