How do I grep history in Linux?

How do I grep history in Linux?
Answer
Use history number | grep keyword the number here refers to how many previous history should be fetched. Example: history 500 will fetch last 500 command of your bash history. To extend your bash history recording add the below lines to your . bashrc file.
 

Tìm kiếm

Back
Top