Open Source Musings

tutorial

If you're doing any work at the command line, that work probably involves more than a couple of keystrokes. You can save time and reduce the amount you type at the command line in two ways.

One way is to create a script that encapsulates all of the commands and options that you'll be using to perform an operation. All you need to do is run the script along with, say, a file name. That's great for single or multiple commands that require a lot of options.

For other commands, an easier way is to create an alias. An alias replaces the command and its options with something shorter. For example, if you want to list the contents of a directory in detail, you can type ls -l at the command line. Or, you can create the alias ll and use that instead.

Let's take a quick look at how to do that.

Read more...