How to Use the Command History with Mac OS X Unix


show more Using the command history provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users show less
please wait ...

Using the command history

In this movie, we are going to learn how to utilize the Unix command history. Early on in this training, we learned how to use the up arrow to go back and review commands that we had issued previously. We can then either reissue those commands or make edits to them. But what you may not have thought about is how does Unix remember those commands? Because even if we close the Terminal window, even if we shut down our Mac and reboot it, Unix still remembers what our previous commands are. So it must be keeping track of them somewhere, and it is. It does it inside a file and that file is inside our user directory, ls -la.

You can see it here. It's a dot file, bash_history. And this is where the bash shell stores its history of commands. We will take a look at the contents of that file. You will see that it lists our previous commands. It's just one line per command. Now yours is probably a lot longer than mine. I actually went in and edited mine to make it a lot shorter. I want you to ...

Using the command history
Video duration: 8m 16s 6h 35m Beginner

Viewers:

Using the command history provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users

Subject:
IT
Software:
Mac OS X Unix
Author:
please wait ...