Datasheet

Linux’s tools for running programs and manipulating files are
simple, unglamorous, and powerful. Although you can use GUI
tools to drag and drop files, real Linux street smarts requires you
to be able to manage your files from the command line by using odd-sounding commands such
as
ls
,
cp
,
ln
, and
mv
. In the first few tasks of this phase, you’ll learn to use some of the most
basic of these tools. Don’t think that the basic nature of these commands is unimportant,
though; like the foundation of a house, these commands support more dramatic parts of the
structure. Specific tasks described in this phase include using basic command-line features;
managing files, directories, and links; finding files; and editing files.
Later tasks in this phase go further, examining streams, pipes, redirection, the shell environ-
ment, and shell scripts. You’ll also learn about managing accounts. Most of the tasks in this phase
assume you have both a normal user account and
root
access, but you must also be able to create,
delete, and otherwise manage normal user accounts for yourself or other users of a Linux system.
This phase maps to portions of the CompTIA Linux+ objectives 2 and 3 and to
portions of the LPIC objectives 103, 104, 109, and 111.
Task 1.1: Use Basic Command-Line
Features
Before delving into the details of commands used to manage, find, and manipulate files, you
must be able to use basic command-line features. Linux supports several
shells
, which are pro-
grams that accept typed commands and display their output. Some shell commands are built
into the shell, but many others are actually external programs. Knowing how to use your
shell’s features will enable to you to be more productive at the Linux command line. The most
common Linux shell is the Bourne Again Shell (
bash
), and it is the one described here. Other
shells, such as
tcsh
and
zsh
, support similar features, although some details differ.
Scenario
A user is experiencing problems with the
whatis
program, a standard Linux script that the user
frequently runs. As the administrator, you must check that this script exists and that it’s not obvi-
ously corrupt. In the process, you’ll use several important Linux command-line features.
83484.book Page 2 Monday, September 18, 2006 8:58 AM