BASH script for applying permissions recursively

Sam Morris sam at robots.org.uk
Thu Jun 29 13:35:26 BST 2006


On Thu, 29 Jun 2006 00:22:29 -0700, Dane Mutters wrote:
>> 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 {} \;
> 
> I tried using those commands a while ago, and found that they choked on 
> filenames with strange characters in them.  I have tested this on the 
> contents copied from an 80GB vfat hard drive, with all manner of strange 
> filenames accumulated over the years, and have not found one that it can't 
> do.

Ooh, if you have an example of a file that find -exec chokes on, could you
please report a bug against coreutils? :)

-- 
/home/sam/.sig




More information about the ubuntu-devel mailing list