# Working Fast

The keystrokes, history tricks and chaining that make experienced people look fast.

Updated: November 10, 2026

## [Keystrokes](https://www.ask-codey.com/courses/bash-in-depth/topics/bash-keystrokes)

1. [Keyboard Shortcuts at the Prompt](https://www.ask-codey.com/lessons/bash-keyboard-shortcuts) (Apprentice): Ctrl+A and Ctrl+E jump to the start and end of the command line, Alt+B and Alt+F move a word at a time, Ctrl+W and Ctrl+U delete a word or the line, and Alt+. brings back the last command's last argument.
2. [History Tricks: !!, !$ and Ctrl+R](https://www.ask-codey.com/lessons/bash-history-tricks) (Journeyman): !! runs the last command again and !$ reuses its last argument, sudo !! repeats a command that needed sudo, Ctrl+R steps back through older matches, and four lines in ~/.bashrc keep a longer history that every terminal adds to.
3. [Jumping Around: cd -, pushd and \*\*](https://www.ask-codey.com/lessons/bash-jumping-around) (Journeyman): cd - switches between two folders, pushd and popd keep a stack of folders to come back to, \*\* reaches into every folder below once globstar is on, and CDPATH lets cd find a project's folders from anywhere.

## [Chaining](https://www.ask-codey.com/courses/bash-in-depth/topics/bash-chaining)

1. [Did It Work? Exit Codes, && and ||](https://www.ask-codey.com/lessons/bash-exit-codes) (Apprentice): Every command ends with an exit code, 0 when it worked and another number when it didn't, which $? shows; && runs the next command only if the last one worked, || only if it failed, and ; either way.

## [Exercise: Fewer Keystrokes](https://www.ask-codey.com/courses/bash-in-depth/topics/exercise-bash-fewer-keystrokes)

1. [Exercise: Fewer Keystrokes](https://www.ask-codey.com/lessons/exercise-bash-fewer-keystrokes) (Journeyman): Write the settings that make your shell faster into a file of your own, count a photo project's photos four folders deep with \*\*, read two exit codes, and write one line that backs up the beach photos and says so only if it worked, then let a check script tell you what's done.

Source: https://www.ask-codey.com/courses/bash-in-depth/chapters/bash-working-fast
