Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 41045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:07:08+00:00 2026-05-10T15:07:08+00:00

We all know how to use <ctrl>-R to reverse search through history, but did

  • 0

We all know how to use <ctrl>-R to reverse search through history, but did you know you can use <ctrl>-S to forward search if you set stty stop ''? Also, have you ever tried running bind -p to see all of your keyboard shortcuts listed? There are over 455 on Mac OS X by default.

What is your single most favorite obscure trick, keyboard shortcut or shopt configuration using bash?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:07:08+00:00Added an answer on May 10, 2026 at 3:07 pm

    When running commands, sometimes I’ll want to run a command with the previous ones arguments. To do that, you can use this shortcut:

    $ mkdir /tmp/new $ cd !!:* 

    Occasionally, in lieu of using find, I’ll break-out a one-line loop if I need to run a bunch of commands on a list of files.

    for file in *.wav; do lame '$file' '$(basename '$file' .wav).mp3' ; done; 

    Configuring the command-line history options in my .bash_login (or .bashrc) is really useful. The following is a cadre of settings that I use on my Macbook Pro.

    Setting the following makes bash erase duplicate commands in your history:

    export HISTCONTROL='erasedups:ignoreboth' 

    I also jack my history size up pretty high too. Why not? It doesn’t seem to slow anything down on today’s microprocessors.

    export HISTFILESIZE=500000 export HISTSIZE=100000 

    Another thing that I do is ignore some commands from my history. No need to remember the exit command.

    export HISTIGNORE='&:[ ]*:exit' 

    You definitely want to set histappend. Otherwise, bash overwrites your history when you exit.

    shopt -s histappend 

    Another option that I use is cmdhist. This lets you save multi-line commands to the history as one command.

    shopt -s cmdhist 

    Finally, on Mac OS X (if you’re not using vi mode), you’ll want to reset <CTRL>-S from being scroll stop. This prevents bash from being able to interpret it as forward search.

    stty stop '' 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We all know when to use include guard, but when shall we not use
We all know that there are many different selector combinations one can use to
As we all know, when we derive a class and use polymorphism, someone, somewhere
I know that to find all the .h files I need to use: find
We all know what virtual functions are in C++, but how are they implemented
We all know you can't do the following because of ConcurrentModificationException : for (Object
I'm trying to use use the LoadInk method of an mathinputcontrol but I can't
We all know it is needed. But WHY is it needed in Java alone,
As we all know that we can send any number of arguments to a
We all know Visual Studio's Edit > Format Document ( Ctrl + K ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.