Linux Crash Course - Bash History

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 52

  • @markhawkes8006
    @markhawkes8006 2 роки тому +12

    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 👍

  • @marlene5547
    @marlene5547 4 місяці тому

    Aargh I've been using Ctrl+R for actual YEARS and never even knew what it actually does 😭
    Thanks for explaining it 😍

  • @danielbjohnson
    @danielbjohnson 2 роки тому +3

    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.

  • @ykkim646
    @ykkim646 2 роки тому +1

    Ur 3rd edition book made it today, Awesome!

  • @Chris-tb7jh
    @Chris-tb7jh 2 роки тому +2

    Loving the beard keep up the great content I’ve learnt so much from your channel

  • @salepopovic73
    @salepopovic73 2 роки тому +2

    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. 🤓

    • @michalroesler
      @michalroesler 11 місяців тому

      That's really valuable tip you gave here @salepopovic73 . The "history -d 513" command and "history -c" command. Thank you very much.

  • @syriangamer89
    @syriangamer89 2 роки тому +7

    Great video. Keep it up. Would love to see you cover things like AWK, SED, XARGS, unless you did already

    • @codewithsusan
      @codewithsusan 2 роки тому +1

      Same!

    • @syriangamer89
      @syriangamer89 2 роки тому +1

      @@codewithsusan Going through more of his videos, he already covered AWK and SED :)

    • @codewithsusan
      @codewithsusan 2 роки тому +2

      @@syriangamer89 Oh, nice. Thanks for the head's up!

  • @elinaskytexts
    @elinaskytexts 2 роки тому +2

    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.

    • @michalroesler
      @michalroesler Рік тому

      Turn the captions on and learn both at the same time.
      Learn the linux and english from the very same videos.

  • @PCMagikHomeLab
    @PCMagikHomeLab 2 роки тому +4

    people like You change the world :) I appreciate all Your work!

  • @okekeebube1426
    @okekeebube1426 2 роки тому +1

    Love your channel best Linux channel I’ve seen

  • @slalomsk8er397
    @slalomsk8er397 2 роки тому

    thanks just added the date and time to my history output

  • @Ranblv
    @Ranblv 2 роки тому +6

    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

    • @satksd
      @satksd 2 роки тому

      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 :)

  • @e00d20
    @e00d20 Рік тому

    wow i love the universe art drawing

  • @WillKohut
    @WillKohut 7 місяців тому

    CTRL+G will gracefully quit the history search (as opposed to ungracefully using CTRL+C)

  • @ubeaut
    @ubeaut 2 роки тому

    Ctrl-r is the most used command I use!

  • @odindio
    @odindio 2 роки тому

    Brilliant, I get the best commands from you. Commands that change the game for me.

  • @Factory400
    @Factory400 2 роки тому +1

    This one yields a lot of fruit. Remarkably helpful.

  • @Acilius.
    @Acilius. 2 роки тому +1

    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!!

  • @hamatawah3698
    @hamatawah3698 2 роки тому +1

    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.

  • @stefosters
    @stefosters 2 роки тому +2

    Brilliant video as always 👏
    Atb 👍

  • @mossaabboudchicha84
    @mossaabboudchicha84 2 роки тому +1

    Hello,thank you very much for this video and all you content in general,i want just to ask question and i have proposition,

  • @andrewpaige9152
    @andrewpaige9152 2 роки тому

    yes keep making content forever, your handsome and your explanation are easy to follow, so thank you.

  • @abodawead9039
    @abodawead9039 2 роки тому +1

    your are super great , thank you very much .
    great job man

  • @erics7004
    @erics7004 2 роки тому

    Amazing video! Thanks for sharing this knowledge!

  • @warnerren1081
    @warnerren1081 2 роки тому +1

    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

  • @JohnBortins
    @JohnBortins 2 роки тому

    Outstanding!

  • @venkatesh4760
    @venkatesh4760 2 роки тому +1

    Thanks for the Great and informative video.

  • @i--i4933
    @i--i4933 2 роки тому +2

    beard looks good

  • @tomasbuzeta3591
    @tomasbuzeta3591 2 роки тому +1

    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?

  • @udhayaraav3490
    @udhayaraav3490 2 роки тому

    Nice one

  • @RavindraYadava
    @RavindraYadava 2 роки тому

    Good Video !! loooong most wanted video...at last.. Can u make video upon MobaXterm..

  • @mossaabboudchicha84
    @mossaabboudchicha84 2 роки тому

    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

  • @bellatrix625
    @bellatrix625 2 роки тому

    You didn't say to remove/edit history, sir.

  • @elibukin4840
    @elibukin4840 2 роки тому

    u didnt touched the session history syncs.

  • @AlexlikesRamen
    @AlexlikesRamen Рік тому

    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

  • @SB-qm5wg
    @SB-qm5wg 2 роки тому

    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.

  • @d00dEEE
    @d00dEEE 2 роки тому +3

    # 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.

  • @sotecluxan4221
    @sotecluxan4221 2 роки тому

  • @stevenroberts1903
    @stevenroberts1903 2 роки тому

    I don't have ?HISTTIMEFORMAT" Mine is called HISTFILESIZE = 2000

    • @LearnLinuxTV
      @LearnLinuxTV  2 роки тому +1

      If you don’t have that variable, you can simply add it to the file.

    • @stevenroberts1903
      @stevenroberts1903 2 роки тому

      @@LearnLinuxTV Oh wow I can add it.. I love Linux.. Thank you.