2

With CTRL + R we can search in previous commands (in the terminal of Debian). I always assumed it was searching my .bash_history, but that doesn't seem to be the case -- right now my .bash_history is entirely blanked out, yet ctrl+r is still working fine. Is it searching a file somewhere I haven't considered, or where is it getting the data from?

some1
  • 494

2 Answers2

1

Ctrl+R is not searching a file. It's searching the history kept in memory by your current shell.

grawity
  • 501,077
0

According to the answer to my question here, The system stores this information in an unnamed file. The files is opened then deleted immediately but can apparently still be searched as long as it is kept open.

terdon
  • 54,564