O'Reilly logo

From Bash to Z Shell: Conquering the Command Line by Peter Stephenson, Jerry Peek, Oliver Kiddle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 6More About Shell History

You've learned about using the shell history in Chapter 4, but there's a good deal more to learn. We start by discussing how to ensure that the shell saves the history when you exit and restores the history when you start a new shell. Later, we cover the method of referring to entries in the history using the ! character in more detail, and look at how you can share history between shell sessions running at the same time.

Setting Up Variables

In order to enable the shell history feature, you need to know how to arrange for the shell to save the lines you've typed and restore them for subsequent sessions. This is done by setting variables to indicate the size of the history in lines (every time you get a new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required