Mac os x web server - CHAPTER 13 INTRODUCING THE BASH SHELL CREATING

CHAPTER 13 INTRODUCING THE BASH SHELL CREATING ALIASES If you ve ever used DOS, you might find yourself inadvertently typing DOS commands at the shell prompt. Some of these will actually work, because most distribution companies create command aliases to ease the transition of newcomers to Linux. Aliases mean that whenever you type certain words, they will be interpreted as meaning something else. However, an alias won t work with any of the command-line switches used in DOS. In the long run, you should try to learn the BASH equivalents. You can create your own command aliases quickly and simply. Just start a BASH shell and type the following: alias =’‘ For example, to create an alias that lets you type del instead of rm, type this: alias del=’rm’ Note that the Ubuntu command must appear in single quotation marks. Listing Files Possibly the most fundamentally useful BASH command is ls. This will list the files in the current directory, as shown in Figure 13-3. If you have a lot of files, they might scroll off the screen. If you re running GNOME Terminal, you can use the scroll bar on the right side of the window to view the list. Figure 13-3. The ls command lists the files in the current directory.

Leave a Reply