grep command in Linux
The grep command is used to find a specific string in a series of outputs. For example, if you want to find a string in a file, you can use the syntax: <Any command with output> | grep “<string to find> “
For Example:
cat Files.txt | grep “new”
Command:
Output:
In this command, we first used cat <file name> to view the content of the file, and then we used cat <file name> | grep “string” to check the string in it.
25 Basic Linux Commands For Beginners
While performing a task, we all need shortcuts. Shortcuts help us to complete a task quickly. Linux comes with such commands which are one to two words, using that commands, you can perform several operations in no time. As a beginner, you must be aware of those basic Linux commands to complete an operation in a short time in the Linux-based operating system.
In this article, you’ll be going through some of the basic Linux commands which beginners can use to complete their tasks very quickly. Let’s go through each, but before that have a short idea on Linux.