LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-14-2016, 06:34 PM   #1
salilsurendran
LQ Newbie
 
Registered: May 2015
Posts: 16

Rep: Reputation: Disabled
ctrl + r not picking up the latest commands in history


when I enterl ctrl + r and enter a search term it goes back in distant history and never finds the commands that I most recently typed that has this keyword
 
Old 05-14-2016, 09:23 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Are you doing this in the same shell session where you typed that command? A shell only reads the history file once when it starts up, and only writes to the file once when it exits. A different shell session will not see anything that was done in another, currently running shell. Also, the default for bash is to overwrite the HISTFILE completely upon exit, so any entries that another shell made since this shell was started will be lost.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] History of failed commands. gaurav_s Linux - Software 7 04-16-2015 07:58 PM
History commands u2u2u2 Linux - Newbie 1 04-13-2011 03:26 PM
what are the system calls called during executing ctrl+c and ctrl+v commands ramyayella Linux - General 5 02-18-2010 05:46 PM
History commands files anjanesh Linux - Newbie 2 05-28-2006 09:40 AM
where is my history of commands? learnfast Linux - Newbie 3 03-14-2005 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration