Im trying to search all files within a directory by name and outputting the files' content onto the shell.Currently I'm only getting a list of filesfind -name '.htaccess' -type f./dir1/.htaccess./dir23/folder/.htaccess...But how can I output the content of each file instead. Thought of something like piping the filename to the cat-command.
Find files and echo content on shell
linux;find;cat
Use cat within the -exec predicate of find:find -name '.htaccess' -type f -exec cat {} +This will output the contents of the files, one after another.