2. Overview
1 Introduction 1
2 Getting Started 8
3 Work Effectively on the Unix Command Line 16
4 Process Text Streams Using Text Processing Filters 24
5 Perform Basic File Management 33
6 Use Unix Streams, Pipes and Redirects 39
7 Search Text Files Using Regular Expressions 44
8 Job Control 47
9 Create, Monitor, and Kill Processes 49
10 Modify Process Execution Priorities 55
11 Advanced Shell Usage 57
12 Filesystem Concepts 61
13 Create and Change Hard and Symbolic Links 63
14 Manage File Ownership 67
15 Use File Permissions to Control Access to Files 70
16 Create Partitions and Filesystems 76
17 Control Filesystem Mounting and Unmounting 79
18 Maintain the Integrity of Filesystems 83
i
12. Module 1
Introduction
1.1 Unix and Linux
s Linux is based on Unix
q Unix philosophy
q Unix commands
q Unix standards and conventions
s There is some variation between Unix operating systems
q Especially regarding system administration
q Often Linux-specific things in these areas
1.2 Unix System Architecture
applications
programs
X shell
kernel
hardware
s The shell and the window environment are programs
s Programs’ only access to hardware is via the kernel
1
19. Module 2
Getting Started
2.1 Files and Directories
s A directory is a collection of files and/or other directories
q Because a directory can contain other directories, we get a directory hierarchy
s The ‘top level’ of the hierarchy is the root directory
s Files and directories can be named by a path
q Shows programs how to find their way to the file
q The root directory is referred to as /
q Other directories are referred to by name, and their names are separated by slashes (/)
s If a path refers to a directory it can end in /
q Usually an extra slash at the end of a path makes no difference
2.2 Examples of Absolute Paths
s An absolute path starts at the root of the directory hierarchy, and names directories under it:
/etc/hostname
q Meaning the file called hostname in the directory etc in the root directory
s We can use ls to list files in a specific directory by specifying the absolute path:
$ ls /usr/share/doc/
8