Grep & Co

# Return list of files where "pattern" is find from /path/to/search/ directory
grep -Rl "pattern" /path/to/search/

# Filtering
| grep pattern -B 5 -A 10            # 5 Lines Before and 10 After pattern                        
| grep -v pattern_I_dont_want        # Use " " and skip character '\' if it doesn't work
| grep -i pattern                    # Non case sensitive

Last updated