Click on Chapters to see Detailed Contents

 

Brief Contents

I Introduction to Solaris

1 The Solaris Operating System 3

2 Getting Started 15

3 The Solaris Utilities 41

4 The Solaris Filesystem 75

5 The Shell I 103

II Intermediate/Advanced Solaris
6 Graphical User Interfaces 129

7 Networking and the Internet 185

8 The vi Editor 245

9 The emacs Editor 291

10 The Shell II (sh) 347

11 Bourne Shell Programming 393

12 The C Shell 435

13 The Korn Shell and Advanced Shell Programming 479

14 Programming Tools 547

15 System Administration 591

III The Solaris Utility Programs
A Regular Expressions 953

B Help! 963

C Security 993

D The POSIX Standards 1007

Glossary 1025

Index 1051
 
 


Contents

Preface xlv

Audience xlv

Benefits xlv

Scope of Coverage and Features xlvi

Parts I, II, and III l

Supplements liii

Thanks liii
 
 

Part I

Introduction to Solaris
 
 

Chapter 1

The Solaris Operating System 3

The Heritage of UNIX 3

What’s So Good about Solaris? 4

System Features 4

Standards 4

Binary Compatibility 4

The Standardization of UNIX 5

How Can UNIX Run on Different Computers/Processors? 5

The C Programming Language 5
Overview of Solaris 6
Solaris Has a Kernel Programming Interface 6

Supports Many Tasks at One Time 6

Supports Many Users at One Time 7

Solaris Provides a Hierarchical Filesystem
with Builtin Security 7

The Shell Is a Command Interpreter
and Programming Language 8

Filename Generation 8

Device-Independent Input and Output 8

Shell Functions 8

Job Control 9

A Large Collection of Useful Utilities 9

Interprocess Communication 9

System Administration 9

Additional Features of Solaris 10
Graphical User Interfaces 10

(Inter)networking Utilities 10

Software Development 11

Screen-Oriented and Graphical Editors 11

Advanced Electronic Mail 11

GNU/FSF 12

Summary 12

Review Exercises 13

Chapter 2

Getting Started 15

Before You Start 15
Name and Version of the Operating System 16

Conventions 16

Keys and Characters 16

Utility Names 16

Filenames 17

Shell and Builtin and Variable Names 17

Items You Enter 17

Prompts and RETURNs 17

Optional Information 18

Solaris2 Designation 18

Logging In 18
Graphical User Interface (GUI) 18

Character-Based Interface 19

Incorrect Login 20

The Shell 21

Logging Out 21

Terminal Emulation and telnet21

Superuser 22

Correcting Mistakes 23
Erasing a Character 23

Deleting a Word 23

Deleting a Line 24

Aborting Execution 24

passwd: Changing Your Password 24

Documentation 26

AnswerBook2 26

man and xman: Displaying the System Manual 27

Editing a File 29
Tutorial: dtpad: Creating and Editing a File 30
Correcting Mistakes 30

Moving the Cursor 31

Highlighting Text 31

Saving a File 31

Ending an Editing Session 32

Tutorial: textedit: Creating and Editing a File 32
Getting Started 32

Correcting Mistakes 33

Moving the Cursor 33

Highlighting Text 33

Saving a File 33

Ending an Editing Session 34

Basic Utilities 34
ls: Listing the Contents of a Directory 34

cat: Displaying a Text File 34

pg or more: Displaying a Long Text File 35

rm: Deleting a File 35

hostname: Displaying a Machine Name 36

Quoting Special Characters 36

Summary 37

Review Exercises 38

Advanced Review Exercises 39

 
Chapter 3
The Solaris Utilities 41
Working with Files 41
cp: Copy a File 41

mv: Change the Name of a File 42

lp: Print a File 43

grep: Find a String 43

head: Display the Beginning of a File 44

tail: Display the End of a File 45

sort: Display a File in Order 45

uniq: Remove Duplicate Lines in a File 45

diff: Compare Two Files 46

file: Test the Contents of a File 46

unix2dos: Convert Solaris Files to DOS/Windows Format 46

Three Useful Utilities 47
echo: Display Text 47

date: Display the Time and Date 47

script: Record a Solaris Session 47

Compressing and Archiving Files 48
compress: Shrink a File 49

uncompress,zcat: Expand a File 50

tar: Pack and Unpack a File 50

Locating Commands 53
which,whereis: Locate Utilities 53

apropos: Search for Keywords 54

Obtaining User and System Information 55
who: List Users on the System 55

finger: List Users on the System 56

w: List Users 57

Communicating with Other Users 58
write: Send a Message 58

talk: Communicate with Another User 59

mesg: Deny or Accept Messages 60

Electronic Mail 61

Similarities between dtmail and mailtool 61

Tutorial: Using dtmail or mailtool to Send
and Receive Electronic Mail 62

Reading Mail 62

Sending Mail 63

Header 63

Alias 64

Tutorial: Using pine to Send
and Receive Electronic Mail 65
Getting Started 65

Sending Mail 66

Receiving Mail 68

Sending Mail to More Than One Person 69

Network Addresses 70
Summary 70

Review Exercises 72

Advanced Review Exercises 73

Chapter 4
The Solaris Filesystem 75
The Hierarchical Filesystem 75
Using the Hierarchical Filesystem 76
Directory and Ordinary Files 76
Filenames 77
Filename Extensions 78

Invisible Filenames 78

mkdir: Create a Directory 78

cd: Change to Another Working Directory 79

The Working Directory 79

Significance of the Working Directory 80
Your Home Directory 80
Startup Files 81
Absolute Pathnames 81

Relative Pathnames 82

The . and .. Directory Entries 83
Important Standard Directories and Files 83
Working with Directories 86
rmdir: Delete a Directory 86

Using Pathnames 86

Special Pathnames 87
mv, cp: Move or Copy a File 88

mv: Move a Directory 88

Access Permissions 88
lsl: Display Permissions 89

chmod: Change Access Permissions 90

Setuid and Setgid Permissions 90

Directory Access Permissions 91

Links 92
ln: Create a Link 94
cp versus ln 94
Symbolic Links 96
Creating a Symbolic Link 96

Using Symbolic Links to Change Directories 97

Symbolically Linked Directories under the Bourne and C Shells 97

Symbolically Linked Directories under the Korn Shell 97

rm: Remove a Link 98
Summary 98

Review Exercises 99

Advanced Review Exercises 101

Chapter 5

The Shell I 103

The Command Line 103
Syntax 103
Command Name 104

Arguments 104

Options 104
Processing the Command Line 105

Executing the Command Line 106

Standard Input and Standard Output 106
The Window/Terminal as a File 107

The Window/Terminal as Standard Input
and Standard Output 107

Redirection 108
Redirecting Standard Output 109

Redirecting Standard Input 110

Appending Standard Output to a File 112

/dev/null 113

Pipes 113
Filters 115

tee: Sending Output in Two Directions 115

Running a Program in the Background 116

Filename Generation/Pathname Expansion 118

The ? Special Character 119

The k Special Character 120

The [] Special Characters 121

Summary 123

Review Exercises 123

Advanced Review Exercises 125
 
 


 
 

Part II

Intermediate/Advanced Solaris

Chapter 6

Graphical User Interfaces 129

What Is a GUI? 129

Using a GUI 130

Logging In 131

Menus 132

Dialog Boxes 132

Screen Layout 133

Window Manager 133

Desktop Manager 133

Workspace Manager 134

CDE Desktop Manager 134
Front Panel 135

Title Bar 138

Common Operations—Menus 138

Window Menu 138

Workspace Menu 139

Logging Out 139

Working with Windows 139
Closing a Window 139

Opening a Terminal Emulator Window 140

Moving a Window 141

Resizing a Window 141

Raising and Lowering Windows 142

Scrolling Text 142

Motif Scroll Bar 143

Athena Scroll Bar 143

OpenLook Scroll Bar 144

Using Icons 145

File Manager 145

The View Menu 149

The View/Set View Options Window 149

Properties 150

Copying and Pasting Text 151
X Window System 153
X Window System Window Managers 154

X Window System and Solaris 154

Bringing Up the X Server 156
Remote Computing and Local Displays 156
Local X Server, Remote Display 157

Local Display, Remote X Server 158

Stopping the X Server 159

Customizing Your X Work Environment 159

Remapping Mouse Buttons 159

Customizing X Applications
on the Command Line 160

Setting X Resources 161

Customizing CDE 163
Style Manager Tools 163
Color Window 163

Font Window 164

Backdrop Window 164

Keyboard Window 164

Mouse Window 164

Beep Window 165

Screen Window 165

Window Window 165

Startup Window 166

.dtprofile 166

Building Menus 167

Actions 170

Front Panel 172

Login Manager 172

Session Manager 172
Initialization Files 173
Login Screen 173

Issuing Commands before and after the Session 174

Session Setup 175

OpenLook Window Manager 176
Workspace Menu 177

File Manager 178

Customizing the Desktop 178

Saving the Desktop 178

Help Viewer 179

Customizing Menus 179

Application Preferences 181

X Applications 181

Summary 183

Review Exercises 184

Chapter 7

Networking and the Internet 185

Network Services 187

Intranets 187

Common Types of Networks 188

Local Area Networks (LANs) 189
Ethernet 189
Wide Area Networks (WANs) 190

Internetworking through Gateways and Routers 190

Network Protocols 191

Host Addresses 193

Subnets 195

Communicating over the Network 198
finger: Learn about Remote Users 198

Sending Mail to a Remote User 200

talk: with a Remote User 201

Mailing List Servers 201

Networking Utilities 201
ping: Test a Network Connection 202

rlogin, telnet: Access a Remote Computer 203

Trusted Hosts and the .rhosts File 206

rcp, ftp: Transfer Files over a Network 207

Anonymous ftp208
rsh: Run a Command Remotely 208

traceroute: Trace a Route over the Internet 209

rwho: List Users on Remote Computers 210

nslookup: Query Internet Name Servers 210

whois: Look Up a User on the Internet 213

Distributed Computing 216
The Client/Server Model 216

Overview of Domain Name Service (DNS) 217

Network Information Service (NIS) 218

Network File System (NFS) 219

automount: Automatic Filesystem Mounting 220

Network Services/Daemons 221

USENET 227

Tutorial: Using pine as a Newsreader 229

Subscribing to Newsgroups 230

Reading News 230

Posting News 230

Unsubscribing from Newsgroups 231

Overview of the World Wide Web 231

Tutorial: Using Netscape 234

Screen Elements 234

Navigating the Web 236

Reading Netnews 236

Downloading Files 237

Using Bookmarks 238

Using a Search Engine 238

Other WWW Browsers 241

More about URLs 241

Creating Your Own Web Page 242

Summary 242

Advanced Review Exercises 244

Chapter 8

The vi Editor 245

History 245

Tutorial: Using vi to Create
and Edit a File 246

Specifying a Terminal 246

Starting vi 246

Command and Input Modes 247

Entering Text 248

Ending the Editing Session 250

Introduction to vi Features 250
Modes of Operation 250

The Display 251

The Status Line 251

Redrawing the Screen 251

The Tilde (~) Symbol 252

Correcting Text as You Insert It 252

Command Case 252

The Work Buffer 252

Line Length and File Size 253

Abnormal Termination of an Editing Session 253

Recovering Text after a Crash 254

Command Mode—Moving the Cursor 254
Moving the Cursor by Characters 255

Moving the Cursor by Words 255

Moving the Cursor by Lines 255

Moving the Cursor by Sentences and Paragraphs 256

Moving the Cursor within the Screen 256

Viewing Different Parts of the Work Buffer 257

Input Mode 257
The Insert Commands 257

The Append Commands 257

The Open Commands 258

The Replace Commands 258

The Quote Command 258

Command Mode—Deleting and Changing Text 258
The Undo Command 259

The Delete Character Command 259

The Delete Command 259

The Change Command 260

The Substitute Command 262

The Case Command 262

Searching and Substituting 262
Searching for a Character 262

Searching for a String 263

Special Characters in Search Strings 263
Substituting One String for Another 264
The Substitute Address 265

The Search and Replace Strings 265

Miscellaneous Commands 269

The Yank, Put, and Delete Commands 269

The General-Purpose Buffer 269
The Yank Command 269

The Put Commands 270

The Delete Commands 270

The Named Buffers 270

The Numbered Buffers 271

Reading and Writing Files 272
The Read Command 272

The Write Command 272

Identifying the Current File 273

Setting Parameters 273
Setting Parameters from vi273

Setting Parameters in a Startup File 273

Setting Parameters in the .exrc Startup File 274

Parameters 274

Advanced Editing Techniques 277
Using Markers 277

Editing Other Files 278

Macros and Shortcuts 278

Executing Shell Commands from vi279

Units of Measure 281
Character 281

Word 281

Blank-Delimited Word 282

Line 282

Screen 283

Repeat Factor 283

Summary 284

Review Exercises 289

Advanced Review Exercises 290

Chapter 9

The emacs Editor 291

About emacs 291
emacs versus vi 292
Tutorial: Getting Started with emacs 293
Starting emacs 293

Stopping emacs 294

Inserting Text 295

Moving the Cursor 296

Moving the Cursor by Characters 296

Moving the Cursor by Words 296

Moving the Cursor by Lines 297

Moving the Cursor by Sentences, Paragraphs,
and Window Position 297

Editing at the Cursor Position 297

Saving and Retrieving the Buffer 298

Basic Editing Commands 298
Keys: Notation and Use 299

Key Sequences and Commands 300

Running a Command without a Key Binding: META-x 300

Numeric Arguments 300

Point and the Cursor 301

Scrolling through a Buffer 301

Erasing Text 301

Searching 302

Incremental Searches 302

Nonincremental Searches 303

Regular Expression Searches 303

Online Help 303

Advanced Editing Topics 305

Undoing Changes 305

Mark and Region 306

Cutting and Pasting: Yanking Killed Text 308

Inserting Special Characters 309

Global Buffer Commands 309

Line-Oriented Operations 310

Unconditional and Interactive Replacement 310

Working with Files 311
Visiting Files 311

Saving Files 311

Working with Buffers 313

Working with Windows 314

Window Creation by Splitting 314

Manipulating Windows 315

Other-Window Display 315

Adjusting and Deleting Windows 315

Foreground Shell Commands 315

Background Shell Commands 316

Language-Sensitive Editing 316
Selecting a Major Mode 317

Human-Language Modes 317

Working with Words 317

Working with Sentences 317

Working with Paragraphs 318

Filling 318

Case Conversion 319

Text Mode 319

C Mode 320
Working with Expressions 320

Function Definitions 321

Indention 321

Customizing Indention for Versions 19 and Above 322
Comment Handling 323
Special-Purpose Modes 323
Shell Mode 324
Customizing emacs 325
The .emacs Startup File 326

Remapping Keys 326

A Sample .emacs File for Versions 19 and Above 328

emacs and the X Window System 329
Mouse Commands for Cut and Paste 329

Mouse-2 Selections 332

Scroll Bars 332

Manipulating Windows with the Mouse 332

Frame Management 333

Manipulating Frames 333

Switching to Another Frame 333

Menu Bars 334
Resources for emacs 334
USENET emacs FAQ (Frequently Asked Questions) 334

Access to emacs 335

Summary 335

Review Exercises 343

Advanced Review Exercises 344

Chapter 10

The Shell II (sh) 347

Bourne Shell Background 348
POSIX Shells 349
Creating a Simple Shell Script 349
chmod: Make a File Executable 349
Command Separation and Grouping 351
; and NEWLINE: Separate Commands 351

\: Continue a Command 351

| and &: Separate Commands and Do Something Else 351

(): Group Commands 354

Redirecting Standard Error 355

Job Control 357

jobs: List Jobs 357

fg: Bring a Job to the Foreground 358

bg: Put a Job into the Background 359

Processes 360
Process Structure 360

Process Identification 361

Executing a Command 362

Invoking a Shell Script 362

#!: Specify a Shell 363

#: Make a Comment 364

Startup Files 364

Parameters and Variables 365
User-Created Variables 366
unset: Remove a Variable 367

readonly: Make a Variable Permanent 367

export: Make Variables Global 368

read: Accept User Input 369

` ...`: Substitute the Output of a Command 371

Keyword Variables 371
HOME: Locate Your Home Directory 372

PATH: Where to Find Programs 372

MAIL: Where Mail Is Kept 373

PS1: Prompt the User (Primary) 373

PS2: Prompt the User (Secondary) 374

IFS: Separate Input Fields 374

CDPATH: Broaden the Scope of cd374

Running .profile with the . (Dot) Builtin 375

Positional Parameters 375
$0: Name of the Calling Program 375

$1–$9: Command-Line Arguments 376

shift: Promote Command-Line Arguments 377

set: Initialize Command-Line Arguments 378

Special Parameters 379
$k and $@: Value of Command-Line Arguments 379

$$: PID Number 380

$?: Exit Status 381

Command-Line Expansion 381
Parameter Expansion 382

Braces 382

Variable Expansion 382

Command Substitution 383

Word Splitting 383

Pathname Expansion 384

Summary 386

Review Exercises 389

Advanced Review Exercises 391

Chapter 11

Bourne Shell Programming 393

Control Structures 394
if...then 394

if...then...else 397

if...then...elif 399

Debugging Shell Scripts 404

for...in 405

for 406

while 407

until 411

break and continue412

case 413

The Here Document 419

Expanding Null or Unset Variables 422
:– Use a Default Value 422

:= Assign a Default Value 422

:? Display an Error Message 423

Builtins 423
exec: Execute a Command 423

trap: Catch a Signal 425

A Partial List of Builtins 428

Functions 429

Summary 431

Review Exercises 432

Advanced Review Exercises 433

 
Chapter 12
The C Shell 435
Shell Scripts 436

Entering and Leaving the C Shell 436

Startup Files 437
History 438
Reexecuting Events 440

!!: Reexecute the Previous Event 440

!n: Event Number 440

!string: Event Text 440

!n:wWord within an Event 441

!!:s/new/oldModify a Previous Event 442

^old^newQuick Substitution 442
Alias 443
Quotation Marks: Single versus Double 444

History Substitution in an Alias 444

Examples 444

Command-Line Expansion 446
{}: Brace Expansion 447

~: Tilde Expansion 448

$n: Parameter Expansion 449

$NAME: Variable Expansion 449

`cmd` Command Substitution 449

Job Control 450

Directory Stack Manipulation 450
dirs: Display the Contents of the Stack 450

pushd: Push a Directory onto the Stack 451

popd: Remove a Directory from the Stack 451

* ? []: Filename Substitution 452

Redirecting Standard Error 452

Filename Completion 453

Variables 454

Variable Substitution 454

String Variables 455

Arrays of String Variables 456

Numeric Variables 456

Expressions 457

Arrays of Numeric Variables 459

Braces 460

Special Variable Forms 460

Reading User Input 460
Shell Variables 460
Shell Variables That Take on Values 461

Shell Variables That Act as Switches 463

Control Structures 465
if 465

goto 466

Interrupt Handling 466

if...then...else 467

foreach 468

while 470

break and continue 470

switch 471
Builtins 472

Summary 475

Review Exercises 476

Advanced Review Exercises 477

Chapter 13
The Korn Shell and Advanced Shell Programming 479
Korn Shell Basics 479
Running Scripts 480

Startup Files 480

Commands That Are Symbols 480

Variables 481
Variable Attributes 481

Locality of Variables 483

Arithmetic 489

Assignments 489

Expressions 490

Operators 490

Builtins 492
Control Structures 493
select 494

repeat 496

Option Processing 496
getopts: Parse Options 498
Input and Output 500
read: Accept User Input 500

print: Display Output 502

File Descriptors 503

Functions 506

Built-in Commands 507

Job Control 507

alias: Shortcut for a Command 507

kill: Abort a Process 508

whence: Display the Absolute
Pathname of a Utility 509

trap: Catch a Signal 509

Command-Line Editing 510
Using the vi Command-Line Editor 511
Pathname Operations 512
Pathname Listing 512

Pathname Completion 512

Pathname Expansion 513

Using the emacs Command-Line Editor 513

History 514

Using the vi Command-Line Editor
on Previous Commands 514

fc: Display, Edit, and Reexecute Commands 515

Viewing the History List 515

Editing and Reexecuting Previous Commands 516

Reexecuting Previous Commands without Calling the Editor 517

Command Processing 517
Token Splitting 518

Alias Substitution 521

Filename Expansion 521

Command Substitution 521

Parameter Expansion 522

Arithmetic Expansion 522

Filename Generation 522

Processing Quotation Marks 522

I/O Redirection and the Coprocess 523

Shell Programs 524
Program Structures 524
Recursion 525
A Programming Problem: makesccs 528

Another Programming Problem: quiz 532

Korn Shell Options (set) 539

Summary 540

Review Exercises 544

Advanced Review Exercises 545

Chapter 14
Programming Tools 547
Programming in C 548
Checking Your Compiler 549

A C Programming Example 550

Compiling and Linking a C Program 553

Using Shared Libraries 555
Fixing Broken Binaries 556

Creating Shared Libraries 557

Using LD_PRELOAD 557

make: Keep a Set of Programs Current 558
Implied Dependencies 559

Macros 562

Debugging C Programs 564
lint: Find Errors in a Program 566

gcc: Compiler Warning Options Find Errors in a Program 567

Symbolic Debuggers 568

Starting a Symbolic Debugger 569
The dbx Debugger 569

The gdb Debugger 573

Graphical Symbolic Debuggers 576
Threads 576

System Calls 577

truss: Trace System Calls 578

Controlling Processes 578

Accessing the Filesystem 578

Source Code Management 579
Evolution of an SCCS File 580

Creating an SCCS File 581

Retrieving an SCCS File 583

Recording Changes to an SCCS File 584

Obtaining the History of an SCCS File 585

Restricting Access to SCCS Files 586

Summary 586

Review Exercises 587

Advanced Review Exercises 589

Chapter 15

System Administration 591

Product Name 592

The System Administrator and Superuser 592

System Administration Tools 593

Avoiding a Trojan Horse 594

Changing the Default PATH 595

kill: Terminate a Process 595

Detailed Description of System Operation 597
SPARC PROM Mode 598
Booting the Machine 600
Solaris x86 Configuration Assistant 600
Stage I 601

Device Configuration Assistant 601

Stage II 601

Booting the System 602
Single-User Mode 603

Maintenance 603

Checking Filesystem Integrity 603
Going to Multiuser Mode 604
Multiuser Mode 605
Logging In 605

Running a Program and Logging Out 606

Bringing the System Down 606
Going to Single-User Mode 606
Turning the Power Off 607
Crashes 607
Important Files and Directories 608

Types of Files 619

Ordinary Files, Directories, Links, and Inodes 619

Symbolic Links 620

Special Files 620

Fifo Special Files (Named Pipes) 621

Sockets 622

Major and Minor Device Numbers 622

Block and Character Devices 622

Raw Devices 623

Volume Management 623
CDROM 624

Floppy Disk 624

Day-to-Day System Administration 625
Adding and Removing Users 625
Add a New User 625

Remove a User 626

Add a Group 626

admintool 627

Adding and Removing Software Packages 627

Web Start 628

Patches 629

Backing Up Files 631

ufsdump, ufsrestore: Backup and Restore Files 632
Add/Remove Devices: Reconfigure Reboot 634

Add/Remove Drivers 635

Disk Capacity Planning/Partitioning 635

format: Partitioning a Disk 636

fdisk: Partitioning a Disk 638

Add/Remove Printers 639
Add a Local Printer 639

Add a Remote Printer for Solaris 2.5 and Earlier 640

Add a Remote Printer for Solaris 2.6 and Above 640

Add a Printer Using admintool641

Remove a Printer 642

Check Your Mail and Log Files 642

Schedule Routine Tasks 642

Install New Software 643

Install AnswerBook2 643

Install AnswerBook2 under Solaris 7645

Share Files with Other Machines 646

Share Filesystems 647

Unshare Filesystems 648

Mount Remote Filesystems 648

Automatically Mount Filesystems 649
Unmount Remote Filesystems 652

Miscellaneous Filesystem Commands 653

Procfs 654

Network Services 656

Set Up Network Files 656
hosts: List of Machines 656

netmasks: For a Subnetted Network 656

defaultrouter: Specify a Default Router 657

hostname.interface: Specify Network Hardware 657

NIS 657

DNS: Domain Name Service 658

resolv.conf: How to Resolve Hostnames 658

nsswitch.conf: Specify Order to Consult Services 658

PPP 658
sendmail: Set Up Mail 658
sendmail: Mail Client 659

sendmail: Mail Server 660

Aliases 661
System Reports 662
sar: Report on System Activity 662

iostat: Report I/O Statistics 664

vmstat: Report Virtual Memory Statistics 666

netstat: Report Network Statistics 667

mpstat: Report Multiple Processor Statistics 668

top: Report on Processes Using the Most Resources 669

Problems 669
When a User Cannot Log In 669

When the System is Slow 671

lsof: Find Large, Open Files 673

Keeping a Machine Log 673

Keeping the System Secure 674

ACL (Access Control List) 674

Automated Security Enhancement Tools 676

Monitoring Disk Usage 677
Growing Files 677

Disk Quota System 678

Removing Unused Space from a Directory 678

Getting Information to Users 679

Summary 680

Review Exercises 680

Advanced Review Exercises 681
 
 
 
 

Part III

The Solaris Utility Programs
 
sample 
Very brief description of what the command does  689 
admin 
Creates or changes the characteristics of an SCCS file  691 
at 
Executes a shell script at a time you specify  694 
cal 
Displays a calendar  697 
cat 
Joins or displays files  698 
catman 
Preformats and indexes man pages  700 
cc 
Compiles C programs  702 
cd 
Changes to another working directory  707 
chgrp 
Changes the group associated with a file  708 
chmod 
Changes the access mode of a file  709 
chown 
Changes the owner of a file  713 
cmp 
Checks two files to see if they differ  714 
comm 
Compares sorted files  716 
compress 
Compresses or decompresses files  717 
cp 
Copies one or more files  719 
cpio 
Creates an archive or restores files from an archive  721 
crontab 
Schedules a command to run regularly at a specified time  725 
cut 
Selects characters or fields from input lines  727 
date 
Displays or sets the time and date  729 
dd 
Copies a file from one device to another  731 
delta 
Records changes in an SCCS-encoded file  734 
df 
Displays the amount of available disk space  736 
dfmounts 
Lists remotely mounted filesystems  738 
diff 
Displays the differences between two files  739 
dircmp 
Displays the differences between two directories  742 
du 
Displays information on disk usage  745 
echo 
Displays a message  747 
expr 
Evaluates an expression  749 
file 
Displays the classification of a file  752 
find 
Finds files based on various criteria  753 
finger 
Displays detailed information on users  758 
fmt 
Formats text very simply  760 
fsck 
Checks and repairs a filesystem  761 
ftp 
Transfers files over a network  765 
gcc 
Compiles gcc, g++, C, and C++ programs  769 
get 
Creates an unencoded version of an SCCS file  773 
grep 
Searches for a pattern in files  777 
gzip 
Compresses or decompresses files  781 
head 
Displays the beginning of a file  784 
kill 
Terminates a process  785 
ln 
Makes a link to a file  787 
lp 
Prints files  789 
ls 
Displays information about one or more files  791 
mailx 
Sends and receives electronic mail  797 
make 
Keeps a set of programs current  803 
man 
Displays documentation for commands  809 
mesg 
Enables/disables reception of messages  812 
mkdir 
Makes a directory  813 
mkfile 
Creates a file/swap area  814 
more 
Displays a file, one screenful at a time  815 
mv 
Moves (renames) a file  818 
nawk 
Searches for and processes patterns in a file  820 
nice 
Changes the priority of a command  844 
nohup 
Runs a command that keeps running after you log out  846 
od 
Dumps the contents of a file  847 
paste 
Joins corresponding lines from files  849 
patch 
Updates source code  851 
pg 
Displays a file, one screenful at a time  857 
pr 
Paginates files for printing  860 
prs 
Prints a summary of the history of an SCCS file  862 
ps 
Displays process status  865 
quot 
Summarizes filesystem ownership information  868 
rcp 
Copies one or more files to or from a remote computer  870 
rlogin 
Logs in on a remote computer  872 
rm 
Removes a file (deletes a link)  873 
rmdel 
Removes a delta from an SCCS file  875 
rmdir 
Removes a directory  876 
rsh 
Executes commands on a remote computer  877 
rwho 
Displays names of users on computers attached to a network  879 
sed 
Edits a file (not interactively)  880 
sleep 
Creates a process that sleeps for a specified interval  890 
sort 
Sorts and/or merges files  891 
spell 
Checks a file for spelling errors  900 
stty 
Displays or sets terminal/emulator parameters  902 
swap 
Administrates swap space  907 
tail 
Displays the last part of a file  909 
tar 
Stores or retrieves files to/from an archive file  912 
tee 
Copies standard input to standard output and zero or more files  915 
telnet 
Connects to a remote computer over a network  916 
test 
Evaluates an expression  918 
touch 
Updates access and modification time for a file  922 
tr 
Replaces specified characters  924 
truss 
Traces a process  926 
tty 
Displays the pathname of the login device  932 
ufsdump 
Backs up files or filesystems  933 
ufsrestore 
Restores files from a ufsdump archive  936 
umask 
Establishes or displays the file-creation permissions mask  939 
uniq 
Displays lines of a file that are unique  940 
Displays information on system users  942 
wc 
Displays the number of lines, words, and characters in a file  944 
which 
Shows where a command is located in your path  945 
who 
Displays names of users  946 
write 
Sends a message to another user  948 
xargs 
Converts standard output of one command into arguments for another  949 

 

Appendix A

Regular Expressions 953

Characters 953

Delimiters 953

Simple Strings 954

Special Characters 954

Period 954

Square Brackets 954

Asterisk 955

Caret and Dollar Sign 956

Quoting Special Characters 956

Rules 956
Longest Match Possible 956

Empty Regular Expressions 957

Bracketing Expressions 957

The Replacement String 958

Ampersand 958

Quoted Digit 958

Extended Regular Expressions 959

Summary 960
 
 

Appendix B

Help! 963

System Documentation and Information 963
Where Can I Find More Documentation? 963

Where Can I Look Up a Word? 964

What Are Some Useful Solaris Internet Sites? 965

What Are the Names of Some Solaris Newsgroups? 966

What Are Some Useful Mailing Lists? 966

How Do I Find the Program I Want on the Internet? 967
Utility Programs 968

Security Programs 969

Communication Programs 970

Downloading, Installing, and Running Software 973
What Is the Difference Between Installing a Binary
and a Source Software File? 973

How Do I Get a Program Off the Internet
and Run It on My Computer? 973

How Do I Use ftp? 974

How Do I Download gzip? 976

How Do I Install gzip? 977

Downloading (Using ftp), Compiling,
and Installing GNU make 979

How Do I Unpack the Software Source Code? 981

How Do I Compile and Link the Software? 981

How Do I Install the Compiled Software? 984

Downloading a File Using a Browser
(and Installing It) 984

Installing the File 986

Getting Started with Solaris 987
How Do I Specify the Terminal I Am Using? 987

How Do I Send Files to a Printer? 988

What Is the Name of the Machine I Will Log In On? 988

What Is My Login Name? 988

What Is My Password? 988

What Is the Termcap or Terminfo Name
for My Terminal? 988

Which Shell Will I Be Using? 989

How Do I Get Started with a Graphical User Interface (GUI)? 989
What Is a Window? 990
What Is the Root Window? 991
What Is a Title Bar? 991

What Is a Button? 991

What Is a Slider? 991

What Is a Scroll Bar? 992

What Is an Icon? 992
 
 

Appendix C

Security 993

Encryption 993
Public Key Encryption 994

Secret Key Encryption 995

Implementation 995

File Security 996

PGP 996

Mail Transfer Agents 997

Mail User Agents 997

Network Security 997
Network Security Solutions 998

Network Security Guidelines 999

Host Security 1000
Login Security 1002

Remote Access Security 1003

Viruses and Worms 1004

Physical Security 1004

Summary 1005
Appendix D

The POSIX Standards 1007

POSIX.1 1007
The POSIX.1 FIPS 1009
POSIX.2 1009
Localization 1010

The POSIX Shell 1012

Utilities for Portable Shell Applications 1013

cksum 1015

command 1015

getconf 1015

locale 1016

localedef 1017

logger 1017

mkfifo 1017

pathchk 1017

pax 1018

printf 1018

The User Portability Utilities Option (UPE) 1018

Software Development Utilities 1019

POSIX.3 1020

POSIX.4 1020

POSIX.5 1021

POSIX.9 1021

System Administration 1021
Draft POSIX Standards 1022
Security 1022

Networks 1023

Profiles and POSIX Standards 1024

Summary 1024

Glossary 1025

Index 1051