BASH script for applying permissions recursively

Dane Mutters dmutters at
Thu Jun 29 07:08:26 BST 2006


	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.
	The reason I wrote this script is so that when somebody transfers files from 
a vfat partition (or some other filesystem without UNIX permissions), that 
person could then set all the permissions to something reasonable without 
having to do it all manually.  All other solutions I found on the 'net choked 
on either large directory structures, filenames with odd characters in them, 
or filenames with spaces in them.
	Please let me know what you think about whether this is something that would 
be useful to Ubuntu users.



<script attached>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/x-shellscript
Size: 3669 bytes
Desc: not available
Url :

More information about the ubuntu-devel mailing list