learning_unix_for_osx_2nd_edition.pdf

(12218 KB) Pobierz
Learning
Unix for OS X
GOING DEEP WITH THE TERMINAL AND SHELL
Dave Taylor
on
n
iti
ita
Ed
ap
d
El C
2 n
ve r s
Co
SECOND EDITION
Learning Unix for OS X
Dave Taylor
Boston
Learning Unix for OS X
by Dave Taylor
Copyright © 2016 Dave Taylor. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editor:
Rachel Roumeliotis
Production Editor:
Nicole Shelby
Copyeditor:
Sonia Saruba
Proofreader:
Rachel Head
January 2016:
September 2012:
Second Edition
First Edition
Indexer:
Judy McConville
Interior Designer:
David Futato
Cover Designer:
Randy Comer
Illustrator:
Rebecca Demarest
Revision History for the Second Edition
2016-01-19:
First Release
See
http://oreilly.com/catalog/errata.csp?isbn=9781491939987
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Learning Unix for OS X,
the cover
image, and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the author have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the author disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
978-1-491-93998-7
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1. Why Use Unix?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The Power of Unix
Batch Renames and Extracting File Lists
Finding Hidden Files
Folders or Directories?
Thousands of Free Applications
Power Internet Connections
Commands Included with Unix
Displaying All Unix Commands
The 10 Most Common Unix Commands
A Simple Guided (Unix) Tour
1
4
5
6
7
7
9
9
9
10
2. Using the Terminal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Launching the Terminal
Syntax of a Unix Command
Exercise: Entering a Few Commands
Types of Commands
Changing the Terminal’s Preferences
Features of the Terminal
Customizing Your Terminal Session
Setting the Terminal’s Title
Using AppleScript to Manipulate the Terminal
Working with .terminal Files
Working with the Terminal
The Shell Prompt
Entering a Command
13
14
16
17
18
21
23
23
24
24
25
27
27
iii
Zgłoś jeśli naruszono regulamin