I need to search a file in unix which starts with "catalina"
find ... what to be used effectively -name, -exec ? Whats the expression
Also I need to show few files at a time, then show some more. There are huge set of log files in there. I know there开发者_开发问答 is some expression, but forgot...
find /path/to/search/in -name 'catalina*'
Use iname
to match case-insensitively.
To not be overwhelmed with a long list of files, filter through less
(append |less
). You can also use more
instead of less
.
If catalina is the file name, then use
find -name 'catalina*'
If catalina is the first word contained in the file, then use
find -type f | xargs head -v -n 1 | grep -B 1 -A 1 -e '^catalina'
精彩评论