Sys-Admin

Introduction

Grep is a tool used to search strings.

Application

General commands.

grep [options] 'search_pattern' file

Options -i - case insensitive. -r - search directory recursively. --color -add color to output when using sudo. -v - invert match. words that don’t match. -w - match exact search word. -o - show only matching option. -E - Use extended regex

Show uncomment config lines

grep -vE '^\s*#|^\s*$' /etc/ssh/sshd_config --color

Breakdown:

So this part removes:

Referances

  1. Grep wiki