In many cases after I find a file using the find command I then want to open the file or cat it or maybe print it. How can I operate on the result from find? For example, : find . -name myfile.txt./docs/myfile.txt: find . -name myfile.txt | lessdoes not work because it feeds the string ./docs/myfile.txt to less, not the contents of the file at the specified path.
Access a file located with find
shell;command line;find;output
Similar to @coffeeMug, this is the more up-to-date way to doing this as it is apparently faster:find . -name *.log -exec ls -l '{}' +I'll also point you to CommandLineFu, which is always helpful with these things.