Section 3.4. Running a GNU Utility


[Page 44 (continued)]

3.4. Running a GNU Utility

As we saw in Chapter 1, "What Is Linux?," most of the utility commands that are part of a Linux distribution come from the Free Software Foundation's GNU Project. Therefore, they are strictly not Linux utilities but GNU utilities. People tend to use these descriptions interchangeably, however, since they come packaged in a Linux distribution.

To run a utility, simply enter its name and press the Enter key. From now on, when I mention that you should enter a particular bit of text, I also implicitly mean that you should press the Enter key after the text. This tells the shell that you've entered the command and that you wish it to be executed.

Not all systems have exactly the same utilities installed, so if a particular example doesn't work, don't be flustered. One utility that every system has is called date, which displays the current date and time:

$ date      ... run the date utility. Mon Sep  6 11:25:51 CDT 2004 $ _ 


Whenever I introduce a new utility, I'll write a small synopsis of its typical operation in the format shown in Figure 3-1. It's self-explanatory, as you can see. I use a modified-for-Linux BNF (Backus-Naur Form) notation for the syntax description, which is fully documented in the Appendix.

Figure 3-1. Description of the date command.

Utility: date [yymmddhhmm [ .ss ]]

Without any arguments, date displays the current date and time. If arguments are provided, date sets the date to the supplied setting, where yy is the last two digits of the year, the first mm is the number of the month, dd is the number of the day, hh is the number of hours (use the 24-hour clock), and the last mm is the number of minutes. The optional ss is the number of seconds. Only a super-user may set the date.


Please note that I do not list every different kind of option or present a particularly detailed descriptionthis is best left to the manual pages available on your Linux system.


[Page 45]

Another useful utility is clear, which clears your screen (Figure 3-2).

Figure 3-2. The clear command.

Utility: clear

This utility clears your screen.





Linux for Programmers and Users
Linux for Programmers and Users
ISBN: 0131857487
EAN: 2147483647
Year: 2007
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net