[Shortcut] How to Search Text in Terminal Output on Ubuntu (Linux)?

[Shortcut] How to Search Text in Terminal Output on Ubuntu (Linux)?

Do you want to know how you can search any text in Ubuntu (Linux) terminal?

When you run any command, you get the output on the terminal. Especially if you are running any script in debug mode, a lot of logs get generated on the terminal.

If you want to search a particular text from the terminal output, it is not easy to scroll down complete terminal data and find that text.

If you are searching text manually,

  • We, humans, make mistakes to search the desired text with naked eyes and we miss to identify it.
  • If there are tones of output lines on the terminal, it becomes impossible and time consuming for searching the desired string manually.

Linux (Ubuntu) has a feature that makes your search very easy.

Key Shortcut to Search Text in Terminal Output on Ubuntu

Use the following key shortcut to search text in Ubuntu (Linux) terminal.

Ctrl+Shift+f

It pops up checkboxes with four searching options.

  • Match case
  • Match entire word only
  • Wrap-around
  • Match as a regular expression

Now you can search any string from the terminal output. You can perform a search using a regular expression, case sensitive/insensitive search, wrap-around text searching.

Steps:

  • Press key shortcut Ctrl+Shift+f.
  • Choose the checkbox for different searching options.
  • Write a text you want to search and enter.
  • Keep pressing n to move to the next search.

If you want to be more productive, make a habit of using basic Linux commands for daily use.

This is a simple feature you can use to search text in terminal output on Ubuntu. Keep this trick in mind. It will make your job very easy and saves you a lot of time.

Leave a Reply

Your email address will not be published. Required fields are marked *