I would know how to change permission of all java files in a folder and in each his subfolder recursively. Thank you
Asked
Active
Viewed 988 times
-3
-
If you mean "what is the unix command", that is off-topic here. SO is for programming questions, not general computer questions. There's a superuser exchange for that sort of thing. – azurefrog Jun 17 '16 at 20:40
-
If you're asking about how to write a Java program to do this, see [How do I iterate through files in a directory?](http://stackoverflow.com/questions/3154488/how-do-i-iterate-through-the-files-in-a-directory-in-java) and [How do I programmatically change file permissions?](http://stackoverflow.com/questions/664432/how-do-i-programmatically-change-file-permissions) – azurefrog Jun 17 '16 at 20:42
-
java / terminal: seems to be inconsistency here. – Jean-Baptiste Yunès Jun 17 '16 at 20:50
1 Answers
0
You can then use: find
to search corresponding files and then change mode for each:
find <dir> -name "*.java" -exec chmod <access> {} \;

Jean-Baptiste Yunès
- 34,548
- 4
- 48
- 69