Home > Store

Practical Guide to UNIX for Mac OS X Users, A

Register your product to gain access to bonus material or receive a coupon.

Practical Guide to UNIX for Mac OS X Users, A

eBook (Watermarked)

  • Your Price: $31.99
  • List Price: $39.99
  • About Watermarked eBooks
  • This PDF will be accessible from your Account page after purchase and requires the free Adobe® Reader® software to read it.

    The eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

    Watermarked eBook FAQ

Description

  • Copyright 2006
  • Dimensions: 7-3/8" x 9-1/4"
  • Edition: 1st
  • eBook (Watermarked)
  • ISBN-10: 0-321-63053-X
  • ISBN-13: 978-0-321-63053-7

The Most Useful UNIX Guide for Mac OS X Users Ever, with Hundreds of High-Quality Examples!

Beneath Mac OS® X's stunning graphical user interface (GUI) is the most powerful operating system ever created: UNIX®. With unmatched clarity and insight, this book explains UNIX for the Mac OS X user—giving you total control over your system, so you can get more done, faster. Building on Mark Sobell's highly praised A Practical Guide to the UNIX System, it delivers comprehensive guidance on the UNIX command line tools every user, administrator, and developer needs to master–together with the world's best day-to-day UNIX reference.

This book is packed with hundreds of high-quality examples. From networking and system utilities to shells and programming, this is UNIX from the ground up—both the "whys" and the "hows"—for every Mac user. You'll understand the relationships between GUI tools and their command line counterparts. Need instant answers? Don't bother with confusing online "manual pages": rely on this book's example-rich, quick-access, 236-page command reference!

Don't settle for just any UNIX guidebook. Get one focused on your specific needs as a Mac user!

A Practical Guide to UNIX® for Mac OS® X Users is the most useful, comprehensive UNIX tutorial and reference for Mac OS X and is the only book that delivers

  • Better, more realistic examples covering tasks you'll actually need to perform
  • Deeper insight, based on the authors' immense knowledge of every UNIX and OS X nook and cranny
  • Practical guidance for experienced UNIX users moving to Mac OS X
  • Exclusive discussions of Mac-only utilities, including plutil, ditto, nidump, otool, launchctl, diskutil, GetFileInfo, and SetFile
  • Techniques for implementing secure communications with ssh and scp—plus dozens of tips for making your OS X system more secure
  • Expert guidance on basic and advanced shell programming with bash and tcsh
  • Tips and tricks for using the shell interactively from the command line
  • Thorough guides to vi and emacs designed to help you get productive fast, and maximize your editing efficiency
  • In-depth coverage of the Mac OS X filesystem and access permissions, including extended attributes and Access Control Lists (ACLs)
  • A comprehensive UNIX glossary
  • Dozens of exercises to help you practice and gain confidence
  • And much more, including a superior introduction to UNIX programming tools such as awk, sed, otool, make, gcc, gdb, and CVS

Sample Content

Table of Contents

Preface xxvii

Chapter 1: Welcome to Linux 1

The GNU-Linux Connection 2

The Heritage of Linux: UNIX 5

What Is So Good About Linux? 6

Overview of Linux 10

Additional Features of Linux 15

Chapter Summary 16

Exercises 17

Part I: The Linux Operating System 19

Chapter 2: Getting Started 21

Conventions Used in This Book 22

Logging In 24

Working with the Shell 25

Curbing Your Power: Superuser Access 28

Getting the Facts: Where to Find Documentation 29

More About Logging In 35

Chapter Summary 38

Exercises 39

Advanced Exercises 39

Chapter 3: Command Line Utilities 41

Special Characters 42

Basic Utilities 43

Working with Files 45

| (Pipe): Communicates Between Processes 52

Four More Utilities 53

Compressing and Archiving Files 56

Locating Commands 61

Obtaining User and System Information 63

Communicating with Other Users 67

Email 69

Chapter Summary 69

Exercises 72

Advanced Exercises 73

Chapter 4: The Linux Filesystem 75

The Hierarchical Filesystem 76

Directory and Ordinary Files 77

Working with Directories 88

Access Permissions 91

Links 96

Chapter Summary 102

Exercises 103

Advanced Exercises 105

Chapter 5: The Shell 107

The Command Line 108

Standard Input and Standard Output 113

Running a Program in the Background 125

Filename Generation/Pathname Expansion 127

Builtins 132

Chapter Summary 133

Exercises 134

Advanced Exercises 136

Part II: The Editors 137

Chapter 6: The vim Editor 139

History 140

Tutorial: Creating and Editing a File with vim 141

The compatible Parameter 148

Introduction to vim Features 148

Command Mode: Moving the Cursor 154

Input Mode 158

Command Mode: Deleting and Changing Text 160

Searching and Substituting 164

Miscellaneous Commands 170

Yank, Put, and Delete Commands 171

Reading and Writing Files 174

Setting Parameters 175

Advanced Editing Techniques 180

Units of Measure 184

Chapter Summary 188

Exercises 193

Advanced Exercises 194

Chapter 7: The emacs Editor 195

History 196

Tutorial: Getting Started with emacs 198

Basic Editing Commands 204

Online Help 209

Advanced Editing 212

Language-Sensitive Editing 225

Customizing emacs 235

More Information 240

Chapter Summary 241

Exercises 248

Advanced Exercises 250

Part III: The Shells 253

Chapter 8: The Bourne Again Shell 255

Background 256

Shell Basics 257

Parameters and Variables 277

Processes 292

History 295

Aliases 312

Functions 315

Controlling bash Features and Options 318

Processing the Command Line 322

Chapter Summary 332

Exercises 334

Advanced Exercises 336

Chapter 9: The TC Shell 339

Shell Scripts 340

Entering and Leaving the TC Shell 341

Features Common to the Bourne Again and TC Shells 343

Redirecting Standard Error 349

Working with the Command Line 350

Variables 355

Control Structures 368

Builtins 377

Chapter Summary 381

Exercises 382

Advanced Exercises 384

Part IV: Programming Tools 385

Chapter 10: Programming Tools 387

Programming in C 388

Using Shared Libraries 396

make: Keeps a Set of Programs Current 399

Debugging C Programs 407

Threads 417

System Calls 417

Source Code Management 420

Chapter Summary 430

Exercises 431

Advanced Exercises 432

Chapter 11: Programming the Bourne Again Shell 435

Control Structures 436

File Descriptors 470

Parameters and Variables 474

Builtin Commands 487

Expressions 501

Shell Programs 510

Chapter Summary 520

Exercises 522

Advanced Exercises 524

Chapter 12: The gawk Pattern Processing Language 527

Syntax 528

Arguments 528

Options 529

Notes 529

Language Basics 530

Examples 537

Advanced gawk Programming 554

Error Messages 559

Chapter Summary 560

Exercises 561

Advanced Exercises 561

Chapter 13: The sed Editor 563

Syntax 564

Arguments 564

Options 564

Editor Basics 565

Examples 568

Chapter Summary 578

Exercises 579

Part V: Command Reference 581

Standard Multiplicative Suffixes 586

Common Options 587

The sample Utility 587

sample: Very brief description of what the utility does 588

aspell: Checks a file for spelling errors 589

at: Executes commands at a specified time 593

bzip2: Compresses or decompresses files 596

cal: Displays a calendar 598

cat: Joins and displays files 599

cd: Changes to another working directory 601

chgrp: Changes the group associated with a file 603

chmod: Changes the access mode (permissions) of a file 604

chown: Changes the owner of a file and/or the group the file is associated with 608

cmp: Compares two files 610

comm: Compares sorted files 612

configure: Configures source code automatically 614

cp: Copies files 616

cpio: Creates an archive or restores files from an archive 619

crontab: Maintains crontab files 624

cut: Selects characters or fields from input lines 627

date: Displays or sets the system time and date 630

dd: Converts and copies a file 633

df: Displays disk space usage 636

diff: Displays the differences between two files 638

du: Displays information on disk usage by file 644

echo: Displays a message 647

expr: Evaluates an expression 649

file: Displays the classification of a file 653

find: Finds files based on criteria 655

finger: Displays information about users 661

fmt: Formats text very simply 664

fsck: Checks and repairs a filesystem 666

ftp: Transfers files over a network 671

gcc: Compiles C and C++ programs 678

grep: Searches for a pattern in files 683

gzip: Compresses or decompresses files 688

head: Displays the beginning of a file 691

kill: Terminates a process by PID 693

killall: Terminates a process by name 695

less: Displays text files, one screen at a time 697

ln: Makes a link to a file 702

lpr: Sends files to printers 705

ls: Displays information about one or more files 708

make: Keeps a set of programs current 715

man: Displays documentation for commands 721

mkdir: Creates a directory 724

mkfs: Creates a filesystem on a device 725

Mtools: Uses DOS-style commands on files and directories 728

mv: Renames or moves a file 732

nice: Changes the priority of a command 734

nohup: Runs a command that keeps running after you log out 736

od: Dumps the contents of a file 737

paste: Joins corresponding lines from files 742

pr: Paginates files for printing 744

ps: Displays process status 746

rcp: Copies one or more files to or from a remote system 750

rlogin: Logs in on a remote system 752

rm: Removes a file (deletes a link) 753

rmdir: Removes a directory 755

rsh: Executes commands on a remote system 756

scp: Securely copies one or more files to or from a remote system 758

sleep: Creates a process that sleeps for a specified interval 760

sort: Sorts and/or merges files 762

split: Divides a file in into sections 771

ssh: Securely executes commands on a remote system 773

strings: Displays strings of printable characters 777

stty: Displays or sets terminal parameters 778

tail: Displays the last part (tail) of a file 783

tar: Stores or retrieves files to/from an archive file 786

tee: Copies standard input to standard output and one or more files 791

telnet: Connects to a remote system over a network 792

test: Evaluates an expression 794

top: Dynamically displays process status 798

touch: Changes a file's access and/or modification time 801

tr: Replaces specified characters 804

tty: Displays the terminal pathname 807

tune2fs: Changes parameters on an ext2 or ext3 filesystem 808

umask: Establishes the file-creation permissions mask 810

uniq: Displays unique lines 812

w: Displays information about system users 814

wc: Displays the number of lines, words, and bytes 816

which: Shows where in PATH a command is located 817

who: Displays information about logged-in users 819

xargs: Converts standard input into command lines 821

Part VI: Appendixes 825

Appendix A: Regular Expressions 827

Characters 828

Delimiters 828

Simple Strings 828

Special Characters 828

Rules 831

Bracketing Expressions 832

The Replacement String 833

Extended Regular Expressions 834

Appendix Summary 835

Appendix B: Help 837

Solving a Problem 838

Finding Linux-Related Information 839

Specifying a Terminal 844

Appendix C: Keeping the System Up-to-Date 847

yum: Updates and Installs Packages 848

Apt: An Alternative to yum 850

BitTorrent 855

Glossary 859

Index 913



Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020