I need to print all the files containing the request specified as a console argument, the next line does this
find . "$path" -type f -name "*$key*" -print
however, I would also like to get the total number of files, but by doing this:
find . "$path" -type f -name "*$key*" -print | wc -l
will give me an account, but not the names of these files, which is not the desired result. How to fix this with a single liner (if possible)?
source
share