Re: chmod -R +x for directories only
- From: Buzzbomb <buzzbomb@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 14:19:17 GMT
Keith Matthews wrote:
Its not the find thats the problem, its the whitespace in the results returned which is then being interpreted as field separators by the shell.billy wrote:
billy wrote:
Is it possible to change the permissions of a directory tree (recursively) for execute on directories only?
Billy
Thanks for all the answers.
Keith I tried yours and it works great, but I think the directory may be messed up with Windows long file names ( it's a samba share) and I got some errors e.g. :
chmod: cannot access `./companya/back': No such file or directory chmod: cannot access `up': No such file or directory chmod: cannot access `of': No such file or directory chmod: cannot access `old': No such file or directory chmod: cannot access `system/A.R.': No such file or directory
Indeed, find doesn't seem to cope with those very well.
a command line like
# find . -type d -exec chmod 711 {} \;will work fine as the results of the find are passed directly to chmod without going through the shell.
The downside of the above command is that its inefficient as it invokes chmod separately for each result of the find, whereas the "chmod `find`" will only invoke both the chmod and the find once.
B. .
- Follow-Ups:
- Re: chmod -R +x for directories only
- From: Bruce Stephens
- Re: chmod -R +x for directories only
- References:
- chmod -R +x for directories only
- From: billy
- Re: chmod -R +x for directories only
- From: billy
- Re: chmod -R +x for directories only
- From: Keith Matthews
- chmod -R +x for directories only
- Prev by Date: Re: chmod -R +x for directories only
- Next by Date: Re: Throttling network interface traffic
- Previous by thread: Re: chmod -R +x for directories only
- Next by thread: Re: chmod -R +x for directories only
- Index(es):
Relevant Pages
|