The grep command is powerful utility for searching text within files in the Linux command line.
Here are 10 grep command usage examples that every Linux user, sysadmin and developer should be familiar with.
A thread 🧵👇
Here are 10 grep command usage examples that every Linux user, sysadmin and developer should be familiar with.
A thread 🧵👇
If you're wondering, grep stands for global regular expression print.
You can use grep to search in files, or combine it with pipes to filter the output of another command.
You can use grep to search in files, or combine it with pipes to filter the output of another command.
Once you've mastered it, you'll find it quite useful in your day-to-day work as a Linux user.
In the examples that follow, I will use a file called 'quotes.txt' to demonstrate how to use the commands.
This file's contents are listed below:
pastebin.com
In the examples that follow, I will use a file called 'quotes.txt' to demonstrate how to use the commands.
This file's contents are listed below:
pastebin.com
Those were some simple examples for using grep.
If you read its man page, you will notice plenty of additional parameters and uses for this handy command.
If you read its man page, you will notice plenty of additional parameters and uses for this handy command.
If you found this thread valuable:
1. Toss me a follow for more threads on Linux and Security → @xtremepentest
2. RT the first tweet so other Linux folks can find it too.
1. Toss me a follow for more threads on Linux and Security → @xtremepentest
2. RT the first tweet so other Linux folks can find it too.
Loading suggestions...