O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The grep Command

One of the most commonly used (and known) Unix commands is grep. Learning how to use grep will help you find files that contain a word or pattern. When the grep command is used properly, it can help you search through a file for something specific. For example, what if you wanted to search a file for a unique term?

When we talked about finding data on your Unix system, we narrowed the search down to different variables, such as the size of the file or the creation date. You can also narrow the search with grep.

You will soon learn that grep is one of the most powerful built-in programs in Unix. The program grep is also subdivided into more commands: grep, egrep, and fgrep. These three commands differ in what regular expressions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required