Linux › Section B · Basic commands and the directory hierarchy › Topic B.4

Intermediate commands: grep, less, diff, find, sort

Once you can move around and manage files, the next step is finding things: lines in a log, a file lost somewhere in a tree, the change between two versions. This topic covers the standard tools for searching, viewing, comparing and counting text, with a short primer on regular expressions.

In this topic

  • Tools that work on text
  • grep: finding matching lines
  • A short regular-expression primer
  • Basic and extended regular expressions
  • Worked example: searching a log
  • less, head and tail
  • diff and file
  • find, locate and pwd -P
  • sort, cut, uniq, wc and tr
  • Worked example: counting log levels
  • Common mistakes to avoid
  • Key takeaways

This topic is part of Wuanberri Pro. Checking your access…

← Previous topicNext topic →