How To Combine File Names From find Output Into A String

Using find it is trivial to lookup all files with a particular pattern:

find . -name *.jar

How do I combine the results of that command (e.g. all of the filenames) into a single string separated by a :?

The expected result would look something like:


Thank you in advance for your consideration and response.


find . -name *.jar -printf '%P:'

Leave a Reply

Your email address will not be published. Required fields are marked *