Theory and Practice
About Archives Categories Tags Authors 中文 ไทย

[Bash] Remove Execute Permission of Files in Directory Recursively

May 09, 2016
Edit on Github

Remove execute(x) permission of files in directory recursively via chmod command and Bash script.

#!/bin/bash

# $1 is the directory in which files to be processed
for path in $(find $1 -type f)
do
  chmod -x ${path}
done

References:

[1][Bash] Process HTML Files Format in Volumn

Author: Siong-Ui Te
∈ Category: Bash
∑ Tags: Bash , Commandline , find command , List Files in Directory , chmod command
Powered by Github Pages, Pelican, pyScss.