Hot answers tagged

2

less $(find . -name myfile.txt) less `find . -name myfile.txt` The first is, I believe, both POSIX-compliant and nest-able. The second, I believe, is more portable.


2

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.


1

You can achieve this using find's -exec flag: find . -name "*.log" -exec ls -l '{}' \; In this example find searches for all log files in current directory and then list them using ls -l. In your case you should replace ls with less. See the ACTION part of find man page here find(1) man page.



Only top voted, non community-wiki answers of a minimum length are eligible