How To Find All Files Containing Specific Text In Linux Tecadmin
A basic syntax for searching text with grep command: The grep command offers other useful options for finding specific text in file systems. -r, –recursive: Search files recursively -R, –dereference-recursive: Search files recursively and follow symlinks –include=FILE_PATTERN: search only files that match FILE_PATTERN –exclude=FILE_PATTERN: skip files and directories matching FILE_PATTERN –exclude-from=FILE: skip files matching any file pattern from FILE –exclude-dir=PATTERN: directories that match PATTERN will be skipped. -L, –files-without-match: Print file names containing no match -l, –files-with-matches: Print string containing file names only -i, –ignore-case: ignore case of search string -e, –regexp=PATTERN: Use a pattern to search or specify multiple search strings -w, –word-regexp: force to match whole words...