Tag Archives: grep examples

grep show lines before and after

Usually when searching for keywords, we need to look at the keyword context information, all of which use -A, -B and -C parameters. Show num rows after matching – grep -A Show num rows before matching – grep -B Show … Continue reading

Posted in File & Directory | Tagged , , | Comments Off on grep show lines before and after

linux grep regex examples

Grep regex matches the search content according to the specified rule pattern, which can help us find the content we need precisely. Syntax: grep -E “pattern” file Continue reading

Posted in File & Directory | Tagged , , | Comments Off on linux grep regex examples

linux find command tutorial: find syntax and examples

linux find – search for files in a directory hierarchy. syntax examples use find command – find file find – type filter explanation where x may be any of: b – block device (buffered); c – character device (unbuffered); d … Continue reading

Posted in File & Directory | Tagged , , | Comments Off on linux find command tutorial: find syntax and examples