Jump to content

debian wheezy chmod broken


crp

Recommended Posts

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.

Link to comment
Share on other sites

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 by jimg
  • Like 3
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...