Skip to main content
  1. Posts/

[How to] Search through Bash history

··84 words·1 min·
Tips & How-To's Linux Bash Applications

Quick tip - if you use the Terminal as much as I do, ever been in a situation where you’ve written a particularly long command, and then want to issue that command again but can’t recall it ? Use the history command, and pipe it to grep to search it!

history | grep -i <search-term>

This will give you all commands with the search term and the corresponding line number.

To reissue that command, type

!history <line-number><br />

Simple, easy & effective. CLI ftw.

Sathyajith Bhat
Author
Sathyajith Bhat
Author, AWS Container Hero and DevOps Specialist.

Related

HOWTO: Starcraft 2 on Linux with Wine
··207 words·1 min
Tips & How-To's Applications Linux
Starcraft 2 [runs] under my Linux install with no issues. Since the game’s official release a few days ago I have been getting a good bit of traffic on those two pages - so I figured I would put together a quick HOWTO for getting Starcraft 2 working on your Linux distro of choice. The game runs under Wine 1.2 and/or CrossoverGames 9.1. Crossover 9.1 Starcraft 2 is listed as “officially support” and as such you will find that it has an entry in the automated games installer.
Watermark Photos with digiKam
··129 words·1 min
Tips & How-To's Applications Linux
digiKam supports watermarking, this feature is hidden so well that you might not even realize that it’s there. This is because the watermarking function in digiKam is tucked under the Batch Queue Manager tool which you can use to watermark multiple photos in one go. Here is how this works in practice. Choose Tools | Batch Queue Manager (or press the B key) to open the Batch Queue Manager tool.
Changing file associations and default applications in openSUSE / Gnome
··87 words·1 min
Tips & How-To's Applications Linux GNOME
A quickie: I wanted to change the default application from Banshee/Totem for my media files to VLC ( since I didn’t have proprietary codecs installed, and VLC does). Searched all of YaST/Settings and couldn’t find where to change the default application. The solution was pretty simple, just right click the file(type), click on Properties, and Open-With tab Just choose the default application, or click on Add and select VLC, and you’re done!