Matodo
June 4th, 2011, 01:45 AM
Hello
I'm trying to write a shell script that takes a folder name as an argument, and deletes "x" permissions for all files inside thas folder and in each subfolder.
Here is what I tried:
#!/bin/bash
fname=$1
chmod -x -R $fname
The problem is, I can't access those folders after executing that script. I only hoped to apply those changes on ordinary files inside those folders, but not on folders themselves.
How can I do it?
Thanks a lot :)
I'm trying to write a shell script that takes a folder name as an argument, and deletes "x" permissions for all files inside thas folder and in each subfolder.
Here is what I tried:
#!/bin/bash
fname=$1
chmod -x -R $fname
The problem is, I can't access those folders after executing that script. I only hoped to apply those changes on ordinary files inside those folders, but not on folders themselves.
How can I do it?
Thanks a lot :)