The Java Cafe

The Java Cafe is a community of 3,665 amazing users

Java and Cloud content, by the community for the community

Create new account Log in

Discussion on: Use the Unix "find" command to be more productive

prpatel profile image
Pratik Patel Author

The {} chars are substitution placeholders - basically means to place the found file (with full path) in that place. So if you run:
find . -name "*.java" -exec cat {}
And there's exactly two Java files under the current dir named "" and "", then this is what ultimately get executed:
cat src/main/java/
cat src/main/java/

Of course, if there are more .java files they would be found/matched then exec'd