Chapter 3. GNU and Unix Commands
(Topic 1.3)
This Topic covers the ever-important aspect
of working interactively with Linux command-line utilities.
While it's true that GUI tools are already available to manage
just about everything on a Linux system, a firm understanding
of basic use of command-line utilities is essential.
The family of commands that are part of Linux
and Unix systems has a long history. Individuals or groups
that needed specific tools contributed many of the commands in
the early days of Unix development. Those that were popular
became part of the system and were accepted as default tools
under the Unix umbrella. Today, Linux systems carry new, often
more powerful GNU versions of
these historical commands.
This section covers LPI Topic 1.3, GNU and Unix Commands. Even the Topic
name implies the confusion that may exist regarding the origin
of the commands we're using on GNU/Linux systems. Remember
that for software to be freely distributed as part of your
Linux distribution, it cannot be proprietary and must come
with some form of redistribution ability in its licensing
terms.
This LPI Topic has seven Objectives:
- Objective 1: Work Effectively
on the Unix Command Line
-
This Objective covers the essentials of
working at the command line in a shell, including
environment variables, using the command history and editing
facilities, invoking commands, command substitution, and
recursively executing commands. Weight: 4.
- Objective 2: Process Text
Streams Using Text-Processing Filters
-
There exists a diverse "toolbox" of
interesting and powerful utilities from the GNU textutils package, which can be
used to manipulate text in various ways. This Objective
covers those utilities and how to use them. Weight: 7.
- Objective 3: Perform Basic
File Management
-
If you're used to an entirely GUI computing
environment, performing basic file management manually from
the command line may be awkward at first. You'll find,
however, that after mastering a few simple commands you will
achieve much finer control over file management chores. This
Objective covers simple and recursive file management,
including the use of wildcards (regular expressions).
Weight: 2.
- Objective 4: Use Unix
Streams, Pipes, and Redirects
-
Among the most powerful concepts in the
Linux and Unix worlds is the idea of creating text streams.
This powerful tool offers you the ability to succinctly
string various commands (such as those described in
Objective 2) together into customized editing chains, which
modify text in a serial fashion. Objective 4 includes
redirection and the use of the tee command. Weight: 3.
- Objective 5: Create, Monitor,
and Kill Processes
-
Every running program on a Linux system is
a process. Some processes are
short-lived, like utility programs such as ls. Other processes, usually called
daemons, are intended to run for extended periods or
even constantly; these include processes such as web or
database server software. Managing these processes is an
important activity for a system administrator. This
Objective covers foreground and background processing,
process monitoring, signaling, and how to "kill" a process.
Also covered are some of the commands used to manipulate
running processes. Weight: 5.
- Objective 6: Modify Process
Execution Priorities
-
When you launch a process, you may wish to
instruct the system to lower or raise its scheduling priority relative to the
default. This action has the effect of giving more or less
CPU time to your process. This is accomplished with the
nice command, which modifies
the default scheduling priority prior to running your
command. This Objective covers these modifications. Weight:
2.
- Objective 7: Perform Searches
of Text Files Making Use of Regular Expressions
-
Many tools on your Linux system are capable
of using regular expressions.
At the most basic level, regular expressions are simply
wildcard-matching mechanisms, such as you've probably used
at the command line many times. While detailed use is beyond
the scope of this book and the LPI exams, regular
expressions are a powerful solution to a range of problems.
This Objective covers basic regular expression usage with
command-line tools such as sed and grep. Weight: 3.
The tools and concepts discussed here
represent important and fundamental aspects of working with
Linux, and are essential for your success on Exam 101.
|