Four More Utilities

The echo and date utilities are two of the most frequently used from the large collection of GNU/Linux utilities. The script utility helps you record part of a session in a file, and mcopy makes a copy of a text file that can be read on an MS Windows machine.

echo: Displays Text

The echo utility copies anything you put on the command line after echo to the screen. Some examples are shown in Figure 3-8. The last example shows what the shell does with an unquoted asterisk (*) on the command line: expands it into a list of filenames in the directory.

Figure 3-8. echo copies the command line (but not the word echo) to the screen
$ ls
memo  memo.0714  practice
$ echo Hi
Hi
$ echo This is a sentence.
This is a sentence.
$ echo star: ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.