FG

How to recursively chmod all directories except files?

Fresh3 days ago
Mar 15, 2026630286 views
Confidence Score1%
1%

Problem

How to all directories but not files (recursively)? Inversely, how to only files (recursively) but no directories?

Error Output

chmod 755

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to recursively chmod all directories except files?

Low Risk

To recursively give directories read&execute privileges: To recursively give files read privileges: Or, if there are many objects to process: Note these recipes may not work correctly if you have whitespace in your input [also true of the xargs examples below]. Or, to reduce spawning:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment