Monday, May 6, 2024
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 71409  / 1 Year ago, fri, december 30, 2022, 1:36:14

The command



history | grep "keyword2find"


does not gives unlimited history that i typed in the terminal onwards i installed ubuntu. I want to see all of them without a time span.


More From » command-line

 Answers
4

By default history command, which uses ~/.bash_history file to store command, store only last 2000 commands. So, It doesn't give you unlimited result.



To increase the size, open .bashrc file with this command gedit ~/.bashrc and change the line to increase value



HISTSIZE=1000
HISTFILESIZE=2000


HISTSIZE refers to the number of commands stored.

HISTFILESIZE refers to the number of line contained in the history file.


[#35259] Friday, December 30, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
izeeas

Total Points: 412
Total Questions: 105
Total Answers: 118

Location: Trinidad and Tobago
Member since Fri, May 8, 2020
4 Years ago
izeeas questions
;