CTRL+R moves backward through matched commands at 12:25. We can also press CTRL+S to move forward through them, in case we pressed CTRL+R too many times. Trouble is, in many terminals CTRL+S suspends/locks it. (CTRL+Q resumes it.) This suspension is rarely useful IMHO. So we can run "stty -ixon" to turn it off. It tells the terminal not to intercept presses of CTRL+S, allowing them to reach bash. Also "ALT+SHIFT+," and "ALT+SHIFT+." move to the first and last items in your history respectively. Good content as ever 👍
I think you should discuss about how history is per user as well as per terminal instance. An example: If you have two terminals open and both logged into the same user you would have different history if you run commands in both windows. If you close one terminal it does not merge the history. I am not sure how to handle this annoyance but I know it exist.
Great video as usually! If you need to delete some exact line in history file use history -d number_of_line, or if you need to delete entire history use history -c. 🤓
Hey! Thank you very much for your work! I don't understand English well, but your guides are the best. And I just want to say that your audience will grow more and more every day, because the new time simply requires it.
thanks ..i was wondering why dates and time is not working after editing the bashrc ... source .bashrc fixed the issue .. and this was not mentioned in the video :)
wicked!! :-D what a great insight into a command that we all know - but with totally useful twist. I really appreciated all the insights that you provided here. Keep it up!!
Ha!, I knew about the ctl+R though a little bit by accident but I did it anyway lol there is a short cut button top of your keyboard. I cannot apt-get update nor upgrade my terminal on pine phone... denied ... and I havent solved it yet so... Very handy indeed and super useful. Thank you, sir, appriciate your series a lot.
Very helpfull. Anyone knows how to set time stamp for the history but without editing the profile, I manage several servers so... Also, I would like to know if there is way see not just the command but also the actual output of that command
Hey there! i'm using bash from Vscode as my default terminal. But when I close Vscode or kill the terminal without 'exit' command, i loose my history. How can i fix that?
why in this video you have not mention he file .bash_history which is the base of history command,and for the proposition i want video about firwall in linux
i wanna run docker build . -f Dockerfile -t eli and i get error error checking context: no permission to read from '/home/alex/.bash_histor can u hellp
# Get rid of duplicates in the history list. How many copies of 'ls' do you need? HISTCONTROL=ignoreboth:erasedups # Keep more entries so you can recall that one weird thing you did 14 months ago... HISTSIZE=10000 HISTFILESIZE=10000 stty -ixon # Disable xon/xoff, so ctrl-s does forward search when you typed too many ctrl-r.
CTRL+R moves backward through matched commands at 12:25. We can also press CTRL+S to move forward through them, in case we pressed CTRL+R too many times. Trouble is, in many terminals CTRL+S suspends/locks it. (CTRL+Q resumes it.) This suspension is rarely useful IMHO. So we can run "stty -ixon" to turn it off. It tells the terminal not to intercept presses of CTRL+S, allowing them to reach bash. Also "ALT+SHIFT+," and "ALT+SHIFT+." move to the first and last items in your history respectively. Good content as ever 👍
great tips guys, thanks
Awesome tips man.
Aargh I've been using Ctrl+R for actual YEARS and never even knew what it actually does 😭
Thanks for explaining it 😍
I think you should discuss about how history is per user as well as per terminal instance.
An example:
If you have two terminals open and both logged into the same user you would have different history if you run commands in both windows. If you close one terminal it does not merge the history. I am not sure how to handle this annoyance but I know it exist.
Ur 3rd edition book made it today, Awesome!
Loving the beard keep up the great content I’ve learnt so much from your channel
Great video as usually! If you need to delete some exact line in history file use history -d number_of_line, or if you need to delete entire history use history -c. 🤓
That's really valuable tip you gave here @salepopovic73 . The "history -d 513" command and "history -c" command. Thank you very much.
Great video. Keep it up. Would love to see you cover things like AWK, SED, XARGS, unless you did already
Same!
@@codewithsusan Going through more of his videos, he already covered AWK and SED :)
@@syriangamer89 Oh, nice. Thanks for the head's up!
Hey! Thank you very much for your work! I don't understand English well, but your guides are the best. And I just want to say that your audience will grow more and more every day, because the new time simply requires it.
Turn the captions on and learn both at the same time.
Learn the linux and english from the very same videos.
people like You change the world :) I appreciate all Your work!
Love your channel best Linux channel I’ve seen
thanks just added the date and time to my history output
you don't have to log out to see dates after the bashrc file you can just type source .bashrc and then history will use the new parameters
thanks ..i was wondering why dates and time is not working after editing the bashrc ... source .bashrc fixed the issue .. and this was not mentioned in the video :)
wow i love the universe art drawing
CTRL+G will gracefully quit the history search (as opposed to ungracefully using CTRL+C)
Ctrl-r is the most used command I use!
Brilliant, I get the best commands from you. Commands that change the game for me.
This one yields a lot of fruit. Remarkably helpful.
wicked!! :-D what a great insight into a command that we all know - but with totally useful twist. I really appreciated all the insights that you provided here. Keep it up!!
Ha!, I knew about the ctl+R though a little bit by accident but I did it anyway lol there is a short cut button top of your keyboard. I cannot apt-get update nor upgrade my terminal on pine phone... denied ... and I havent solved it yet so... Very handy indeed and super useful. Thank you, sir, appriciate your series a lot.
Brilliant video as always 👏
Atb 👍
Hello,thank you very much for this video and all you content in general,i want just to ask question and i have proposition,
yes keep making content forever, your handsome and your explanation are easy to follow, so thank you.
your are super great , thank you very much .
great job man
Amazing video! Thanks for sharing this knowledge!
Very helpfull. Anyone knows how to set time stamp for the history but without editing the profile, I manage several servers so...
Also, I would like to know if there is way see not just the command but also the actual output of that command
Outstanding!
Thanks for the Great and informative video.
beard looks good
Hey there! i'm using bash from Vscode as my default terminal. But when I close Vscode or kill the terminal without 'exit' command, i loose my history. How can i fix that?
Nice one
Good Video !! loooong most wanted video...at last.. Can u make video upon MobaXterm..
why in this video you have not mention he file .bash_history which is the base of history command,and for the proposition i want video about firwall in linux
You didn't say to remove/edit history, sir.
u didnt touched the session history syncs.
i wanna run docker build . -f Dockerfile -t eli
and i get error
error checking context: no permission to read from '/home/alex/.bash_histor
can u hellp
Bash history util is ancient and not very useful anymore. It's man pages are awful. I live out of CLI and wish there was something better.
# Get rid of duplicates in the history list. How many copies of 'ls' do you need?
HISTCONTROL=ignoreboth:erasedups
# Keep more entries so you can recall that one weird thing you did 14 months ago...
HISTSIZE=10000
HISTFILESIZE=10000
stty -ixon # Disable xon/xoff, so ctrl-s does forward search when you typed too many ctrl-r.
Ah, you got there first :)
Good tips - thanks
I don't have ?HISTTIMEFORMAT" Mine is called HISTFILESIZE = 2000
If you don’t have that variable, you can simply add it to the file.
@@LearnLinuxTV Oh wow I can add it.. I love Linux.. Thank you.