To find a list of files that match a given pattern, use the -l option. To highlight your search term, add the -color option to your grep command. grep -B 4 "fonts" /var/log/apache2/access.log The default value for num is 2.įor example, the command will display the 4 lines “before” the pattern match. Replace num with the number of lines to display.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |