FG
💻 Software

How to remove executable bit recursively from files (not directories)

Fresh5 days ago
Mar 15, 202692039 views
Confidence Score1%
1%

Problem

When I plug-in an USB stick (FAT) into my Mac or Ubuntu machine, all files have the executable bits set. After having copied the directory structure to my hard disk how do I remove the executable bits recursively just from the files and keep those on the directories?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to remove executable bit recursively from files (not directories)

Low Risk

With GNU (on Ubuntu) single command variant (starting in the current directory): Explanation: - operate recursively - remove executable flags for all users - set executable flags for all users if it is a directory In this case the capital applies only to directories because all executable flags were cleared by . Otherwise sets executable flag(s) also if the flag was originally set for any of user, group or others. With BSD (which is present on Mac OS X) you have to do it separately in two comma…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment