Learning Unix for Mac OS X Panther

Book description

Renowned for its friendliness, Mac OS® X has delighted many a loyal Mac® user with its combined ease use and underlying strength. By no means simplistic, its intelligently designed operating system and user interface boast of sophistication and power, while still offering accessibility to even the most inexperienced computer users. But Mac OS X has gone one step further: it's turned unsuspecting Mac users into Unix® users, too. Perhaps you're already familiar with Unix, just not on the Mac. Or perhaps you opened your Utilities folder, spotted the Terminal icon and double-clicked on it just to see what it does. Suddenly faced with a command line interface, you may have asked, "What does this mean?" followed by the most pressing question, "Why on earth would I ever want to venture into this seemingly user-unfriendly territory?" The new edition of Learning Unix for Mac OS X Panther answers these questions and more. This compact book provides a user-friendly tour for the uninitiated of the Mac's Unix base. You can safely explore Terminal and familiarize yourself with the command line, learning as you go about the hundreds of Unix programs that come with your Mac. You'll begin to understand the power and flexibility of Unix. And if Unix isn't new to you, you'll discover how it translates into this latest Mac incarnation. Updated to cover Mac OS X Panther (Mac OS X 10.3), this book will keep you current with the latest features of your Mac. Learning Unix for Mac OS X Panther begins with a quick but in-depth introduction to Terminal and the command line interface. All the common commands are simply explained with accompanying examples, exercises, and opportunities for experimentation. There are even problem checklists to help you along the way if you get stuck. You'll learn how to:

  • Customize your shell environment

  • Manage files and directories

  • Successfully print from the Unix command line

  • Edit and create files with the vi editor

  • Perform remote logins

  • Access Internet functions, and much more

  • Unix continues to thrive as an operating system because of its power, flexibility, and simplicity, and the vast community that supports it. Mac OS X Panther makes it possible for you to run Unix programs side-by-side with native Mac programs on your Mac desktop. Learning Unix for Mac OS X Panther puts the power of these programs at your fingertips.

    Table of contents

    1. Learning Unix for Mac OS X Panther
      1. Preface
        1. Audience
        2. Who This Book Is Not For
        3. A Brief History
        4. Versions of Unix
        5. Interfaces to Unix
        6. Conventions Used in This Book
        7. Using Code Examples
        8. Comments and Questions
        9. The Evolution of This Book
        10. Acknowledgments for Dave Taylor
        11. Acknowledgments for Brian Jepson
      2. 1. Getting Into Unix
        1. Why Use Unix?
        2. Launching Terminal
          1. Changing Terminal Preferences
            1. Shell
            2. Processes
            3. Emulation
            4. Buffer
            5. Display
            6. Color
            7. Window
            8. Keyboard
        3. Customizing Your Shell Environment
          1. Changing Your Prompt
          2. Creating Aliases
          3. Setting the Terminal Title
          4. Using AppleScript to Manipulate the Terminal
          5. Working with .term Files
        4. Further Customization
      3. 2. Using the Terminal
        1. Working with the Terminal
          1. The Shell Prompt
          2. Entering a Command
            1. date
            2. who
          3. Recalling Previous Commands
          4. Correcting a Command
          5. Ending Your Session
            1. Problem checklist
        2. Syntax of a Unix Command Line
          1. Exercise: Entering a Few Commands
        3. Types of Commands
        4. The Unresponsive Terminal
      4. 3. Using Unix
        1. The Mac OS X Filesystem
          1. Your Home Directory
          2. Your Working Directory
          3. The Directory Tree
          4. Absolute Pathnames
          5. Relative Pathnames
            1. Pathname puzzle
            2. Relative pathnames up
          6. Changing Your Working Directory
            1. pwd
            2. cd
          7. Files in the Directory Tree
          8. Listing Files with ls
          9. Calculating File Size
          10. Completing File and Directory Names
          11. Multiple Commands on the Command Line
          12. Exercise: Exploring the Filesystem
          13. Looking Inside Files with less
        2. Protecting and Sharing Files
          1. Directory Access Permissions
          2. File Access Permissions
          3. Setting Permissions with chmod
            1. Problem checklist
          4. Changing Group and Owner
          5. Changing Your Password
        3. Superuser Privileges with sudo
        4. Exploring External Volumes
      5. 4. File Management
        1. File and Directory Names
        2. File and Directory Wildcards
        3. Creating and Editing Files
          1. Text Editors and Word Processors
          2. The vi Text Editor
            1. vi tour
        4. A Simpler vi Alternative: Pico
        5. Managing Files
          1. Creating Directories with mkdir
          2. Copying Files
            1. cp
            2. Problem checklist
            3. Copying Mac files with resources
          3. Renaming and Moving Files with mv
          4. Finding Files
          5. Removing Files and Directories
            1. rm
            2. rmdir
            3. Problem checklist
          6. Working with Links
          7. Compressing and Archiving Files
            1. gzip
            2. tar
          8. Files on Other Operating Systems
      6. 5. Printing
        1. Formatting and Print Commands
          1. pr
          2. enscript
          3. lpr
            1. Problem checklist
          4. Viewing the Printer Queue
            1. lpq
            2. lprm
          5. Working with AppleTalk Printers
        2. Non-PostScript Printers
      7. 6. Redirecting I/O
        1. Standard Input and Standard Output
          1. Putting Text in a File
            1. cat
        2. Pipes and Filters
          1. grep
          2. sort
          3. Piping to a Pager
          4. Exercise: Redirecting Input/Output
      8. 7. Multitasking
        1. Running a Command in the Background
        2. Checking on a Process
          1. ps
          2. top
        3. Canceling a Process
          1. kill
            1. Problem checklist
      9. 8. Accessing the Internet
        1. Remote Logins
          1. Web and FTP Access
          2. Remote Access to Other Unix Systems
        2. Transferring Files
          1. scp and rcp
          2. FTP
            1. Command-line ftp
            2. SFTP: FTP to secure sites
            3. FTP with a web browser
            4. Other FTP solutions
          3. Easy Shortcuts with Connect to Server
          4. Practice
      10. 9. Of Windows and Downloads
        1. X11
          1. Installing X11
          2. Using X11
          3. Customizing the Applications Menu
          4. OpenOffice.org
          5. Remote X11 Access to Your Mac
            1. Opening a private network
          6. X11 Access to Other Computers
        2. Fink
          1. Listing Available Packages
          2. Installing Packages
        3. Some Picks
          1. Browsing the Web with Lynx
            1. Dumping a web page with Lynx
          2. Electronic Mail with Pine
            1. Configuring Pine
            2. Configuring Pine to send and receive email
            3. Reading email with Pine
            4. Sending email with Pine
          3. Editing Graphics with GIMP
      11. 10. Where to Go from Here
        1. Documentation
          1. The man Command
            1. Problem checklist
          2. Documentation Via the Internet
          3. Books
        2. Shell Aliases and Functions
        3. Programming
          1. Shell Scripts into Droplets
        4. More Possibilities: Perl and Python
      12. Index
      13. Colophon

    Product information

    • Title: Learning Unix for Mac OS X Panther
    • Author(s): Dave Taylor, Brian Jepson
    • Release date: December 2003
    • Publisher(s): O'Reilly Media, Inc.
    • ISBN: 9780596006174