6

[Bash] Remove Execute Permission of Files in Directory Recursively

 3 years ago
source link: http://siongui.github.io/2016/05/09/bash-remove-execute-permission-of-files-in-directory-recursively/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

[Bash] Remove Execute Permission of Files in Directory Recursively

May 09, 2016

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


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK