Mac OS X UNIX Toolbox: 1000+ commands for Mac OS X


Explore a ton of powerful Mac OS X UNIX commands

This handy, compact guide teaches you to use Mac OS X UNIX systems as the experts do: from the command line. Try out more than 1,000 commands to find and get software, monitor system health and security, and access network resources. Apply the skills you learn from this book to troubleshoot networks, lock down security, and ...

See more details below
$26.16 price
(Save 25%)$34.99 List Price
Other sellers (Paperback)
  • All (16) from $7.32   
  • New (10) from $17.91   
  • Used (6) from $7.32   


Explore a ton of powerful Mac OS X UNIX commands

This handy, compact guide teaches you to use Mac OS X UNIX systems as the experts do: from the command line. Try out more than 1,000 commands to find and get software, monitor system health and security, and access network resources. Apply the skills you learn from this book to troubleshoot networks, lock down security, and uncover almost anything you care to know about your Mac OS X system.

Expand your Mac OS X UNIX expertise in these and other areas:

  • Using the shell
  • Finding online software
  • Working with files
  • Playing with music and images
  • Administering file systems
  • Backing up data
  • Checking and managing running processes
  • Accessing network resources
  • Handling remote system administration
  • Locking down security
Read More Show Less

Product Details

  • ISBN-13: 9780470478363
  • Publisher: Wiley
  • Publication date: 3/23/2009
  • Edition number: 1
  • Pages: 288
  • Product dimensions: 6.00 (w) x 8.90 (h) x 2.30 (d)

Meet the Author

Christopher Negus served for eight years on developmentteams for the UNIX operating system at the AT&T labs, whereUNIX was created and developed. He also worked with Novell on UNIXand UnixWare development. Chris is the author of the bestsellingFedora and Red Hat Linux Bible series, Linux Toys II, LinuxTroubleshooting Bible, and Linux Bible 2008 Edition. He now worksas a trainer for Red Hat Enterprise Linux, and is RHEL certified.

Francois Caen hosts and manages business applicationinfrastructures through his company Turbosphere LLC. As anopen-source advocate, he has lectured on OSS network management andInternet services, and served as president of the Tacoma Linux UserGroup. He is a Red Hat Certified Engineer (RHCE).

Thomas Myer is a consultant, speaker, and writer. He hasbecome closely involved with various aspects of Mac OS X and iPhoneprogramming. He has switched his entire web development business toMac-based systems.

Read More Show Less

Table of Contents

Introduction xix

Chapter 1: Starting with UNIX on Mac OS X 1

About FreeBSD, NetBSD, and OpenBSD 2

Finding Mac OS X Resources 4

Focusing on Mac OS X Commands 4

Finding Commands 5

Command Reference Information in UNIX 6

Summary 9

Chapter 2: New to Mac OS X? 11

What Is Mac OS X UNIX? 11

Finding Terminal and Utilities 12

Directory Structure 16

Your Home Directory 18

Spotlight 19

Getting and Using Fink 21

Mounting and Unmounting Drives 23

Learning to Love Launchd 25

Summary 25

Chapter 3: Using the Shell 27

Terminal Windows and Shell Access 27

Using the Shell 28

Using bash History 29

Using Command-Line Completion 30

Redirecting stdin and stdout 31

Using Aliases 33

Tailing Files 34

Acquiring Super User Power 34

Using Environment Variables 35

Creating Simple Shell Scripts 36

Editing and Running a Script 36

Adding Content to Your Script 37

Summary 41

Chapter 4: Working with Files 43

Understanding File Types 43

Using Regular Files 43

Using Directories 44

Using Symbolic and Hard Links 45

Using Device Files 46

Using Named Pipes and Sockets 46

Setting File and Directory Permissions 47

Changing Permissions with chmod 48

Setting the umask 51

Changing Ownership 51

Traversing the File System 51

Copying Files 53

Searching for Files 55

Generating the locate Database 55

Finding Files with locate 56

Locating Files with find 57

Using Other Commands to Find Files 59

Finding Out More About Files 59

Listing Files 59

Verifying Files 60

Summary 62

Chapter 5: Manipulating Text 63

Matching Text with Regular Expressions 63

Editing Text Files 64

Using the Pico and Nano Editors 65

Listing, Sorting, and Changing Text 67

Listing Text Files 67

Paging Through Text 68

Paginating Text Files with pr 69

Searching for Text with grep 69

Replacing Text with sed 71

Translating or Removing Characters with tr 73

Checking Differences Between Two Files with diff 73

Using awk and cut to Process Columns 75

Summary 76

Chapter 6: Advanced Scripting 77

Shell Scripting on Mac OS X 77

Creating a Basic Shell Script 78

Adding Command-Line Arguments 80

Things to Watch Out For 83

Using the Script Command 83

AppleScripting 84

Working with the Open Command 87

Summary 90

Chapter 7: Administering File Systems 91

Understanding File System Basics 91

Setting Up the Disk Initially 92

Checking Your Disk Setup 92

Understanding File System Types 92

Creating and Managing File Systems 94

Partitioning Hard Disks 94

A Better Option: Nondestructive Partitioning 95

Mounting and Unmounting File Systems 96

Checking File Systems 97

Finding Out About File System Use 99

Summary 101

Chapter 8: Backups and Removable Media 103

Backing Up Data to Compressed Archives 103

Creating Backup Archives with tar 103

Using Compression Tools 105

Listing, Joining, and Adding Files to tar Archives 107

Backing Up over a Network 107

Backing Up tar Archives over ssh 108

Backing Up Files with rsync 109

Backing Up to CD or DVD 110

Working with Time Machine and Time Capsule 111

Summary 112

Chapter 9: Checking and Running Processes 115

Listing Active Processes 116

Viewing Active Processes with ps 116

Watching Active Processes with top 121

Finding and Controlling Processes 123

Using grep and pgrep to Find Processes 123

Using fuser to Find Processes 124

Summary 131

Chapter 10: Managing the System 133

Monitoring Resources 133

Monitoring Memory Use 134

Monitoring CPU Usage 135

Monitoring Storage Devices 136

Mastering Time 137

Changing Time Zone 137

Displaying and Setting Time and Date 137

Using Network Time Protocol to Set Date/Time 139

Checking Uptime 139

Starting and Stopping Your System 140

Straight to the Kernel 141

Summary 141

Chapter 11: Managing Network Connections 143

Configuring Network Interfaces 143

Managing Network Interface Cards 144

Managing Network Connections 147

Starting and Stopping Network Connections 148

Starting and Stopping Network Services 149

Checking Name Resolution 149

Troubleshooting Network Problems 151

Checking Connectivity to a Host 152

Checking Address Resolution Protocol (ARP) 153

Tracing Routes to Hosts 154

Displaying netstat Connections and Statistics 156

Summary 157

Chapter 12: Accessing Network Resources 159

Transferring Files 159

Downloading Files with wget 159

Transferring Files with curl 161

Transferring Files with FTP Commands 162

Using SSH Tools to Transfer Files 164

Sharing Remote Directories 165

Sharing Remote Directories with NFS 165

Sharing Remote Directories with Samba 167

Chatting with Friends in IRC 172

Using Text-Based E‑mail Clients 173

Summary 175

Chapter 13: Remote System Administration 177

Remote Login and Tunneling with SSH 177

Configuring SSH 179

Logging in Remotely with ssh 179

Using screen: A Rich Remote Shell 184

Reconnecting to a screen Session 185

Naming screen Sessions 186

Sharing screen Sessions 186

Using a Remote Windows Desktop 186

Using Remote Desktop and Applications 187

Sharing Your Desktop Using VNC 188

Summary 189

Chapter 14: Locking Down Security 191

Working with Users and Groups 192

Managing Users the GUI Way 192

Checking on Users 193

Configuring the Built-in Firewall 195

Working with System Logs 197

Summary 197

Appendix A: Using vi or Vim Editors 199

Starting and Quitting the vi Editor 200

Moving Around in vi 201

Changing and Deleting Text in vi 202

Using Miscellaneous Commands 204

Modifying Commands with Numbers 204

Using Ex Commands 205

Working in Visual Mode 206

Summary 206

Appendix B: Shell Special Characters and Variables207

Using Special Shell Characters 207

Using Shell Variables 208

Appendix C: Personal Configuration Files 211

Appendix D: AppleScript Command Summary 215

Appendix E: Fink Package Summary 219

Appendix F: Perl Primer 239

Introducing Perl 239

Checking Links on a Website 240

The Entire Script 241

Initializing the Script and Loading Packages 242

Targeting the URL and Extracting Links 243

Processing the @links Array 244

Running the Script 245

Extending the Script 246

Index 247

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Posted May 13, 2009

    A pretty good book with some decent intermediate information - GREAT for a beginner to UNIX in Mac OS X 10.5

    Not a super advanced book for system administrators, but a intermediate level coverage of UNIX commands for Mac OS X 10.5 Leopard.
    GREAT for a beginner to UNIX that wants to learn some Terminal commands.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 20, 2011

    No text was provided for this review.

Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)