June 2000
Beginner
704 pages
14h 55m
English
Linux also comes with a number of programs that you can use to search files. Some of these commands use regular expressions (introduced in Chapter 2, "Entering Commands"), while others, such as the strings command, offer limited search capabilities.
The grep command is part of a family of commands: grep, fgrep, and egrep. These commands are closely related, but have different capabilities in the type of expressions or wildcards that can be used on the command line. For example, to look for any occurrence of the word hacker in the file cathedral-bazaar.txt:
$ grep -n hacker cathedral-bazaar.txt 278: happy extreme, is that a lot of users are hackers too. Because source 279: code is available, they can ...
Read now
Unlock full access