crp Posted July 21, 2015 Share Posted July 21, 2015 the recursive option for chmod is not working. how can i replicate this from a 'home' directory down through its sub-directories? i want to make all .xiv and .XIV files read-write for the group. Quote Link to comment Share on other sites More sharing options...
jimg Posted July 22, 2015 Share Posted July 22, 2015 (edited) Something like this in a shell script? #!/bin/sh #set field splitters IFS="$(printf '\n\t')" #recursive scan of current folder looking for .xiv files for f in $(find . -name '*.xiv' -or -name '*.XIV'); do chmod g+w "$f"; done Edited July 22, 2015 by jimg 3 Quote Link to comment Share on other sites More sharing options...
crp Posted July 23, 2015 Author Share Posted July 23, 2015 thanks, it seemed to basically work. Now I have to refresh my script skills so that it shows what it is doing on all files it finds instead of just the failures and how to pass in the extension as a variable. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.