BASH script for applying permissions recursively
Sitsofe Wheeler
sitsofe at yahoo.com
Thu Jun 29 08:02:19 BST 2006
On Wed, 2006-06-28 at 23:08 -0700, Dane Mutters wrote:
> I'm a newbie at scripting, but I think I've come up with something useful
> that you might want to take a look at. It's a script that can be used to
> change the permissions of files and directories recursively, respectively.
> It is able to handle every file name I've thrown at it, including those with
> quotes, spaces, dashes (in any part of the filename), etc. I could not
> figure out how to create a file with a slash in it, so that remains untested.
Your script is interesting but I'm not sure that this mailing is the
right place for it (really it could do with been on a "Unix Hacks"
website). It may also be possible to do something similar with two
commands e.g.
find pathtodir -type d -exec chmod 664 {} \;
find pathtodir -type d -exec chmod 755 {} \;
--
Sitsofe | http://sucs.org/~sits/
More information about the ubuntu-devel
mailing list