Take Control of the Mac Command Line with Terminal, 3rd Edition


Book Description

Learn how to unleash your inner Unix geek! Version 3.3, updated February 12, 2024 This book introduces you to the Mac’s command line environment, teaching you how to use the Terminal utility to accomplish useful, interesting tasks that are either difficult or impossible to do in the graphical interface.n If you've ever thought you should learn to use the Unix command line that underlies macOS, or felt at sea when typing commands into Terminal, Joe Kissell is here to help! With this book, you'll become comfortable working on the Mac's command line, starting with the fundamentals and adding more advanced topics as your knowledge increases. Now includes complete coverage of Monterey, Big Sur, Catalina, and zsh! Joe includes 67 real-life "recipes" for tasks that are best done from the command line, as well as directions for working with permissions, carrying out grep-based searches, creating shell scripts, and installing Unix software. The book begins by teaching you these core concepts: • The differences among Unix, a command line, a shell, and Terminal • Exactly how commands, arguments, and flags work • The basics of Terminal's interface and how to customize it Next, it's on to the command line, where you'll learn: • How to navigate your Mac's directory structure • Basic file management: creating, copying, moving, renaming, opening, viewing, and deleting files • Creating symbolic links • The types of command-line programs • How to start and stop a command-line program • How to edit a text file in nano • How to customize your prompt and other shell defaults • The importance of your PATH and how to change it, if you need to • How to get help (Joe goes way beyond telling you to read the man pages) You'll extend your skills as you discover how to: • Create basic shell scripts to automate repetitive tasks. • Make shell scripts that have variables, user input, conditional statements, loops, and math. • See which programs are running and what system resources they're consuming. • Quit programs that refuse to quit normally. • Enable the command line to interact with the Finder. • Control another Mac via its command line with ssh. • Understand and change an item's permissions, owner, and group. • Run commands as the root user using sudo. • Handle output with pipe (|) or redirect (> or <). • Use grep to search for text patterns in files and filter output. • Install new command-line software from scratch or with a package manager. • Use handy shortcuts in the Terminal app itself and in zsh. Questions answered include: • What changed on the command line in recent versions of macOS? • What are the differences between the zsh shell and the bash shell? • Which shell am I using, and how can I change my default shell? • How do I quickly figure out the path to an item on my Mac? • How can I customize my Terminal window so I can see man pages behind it? • How can I make a shortcut to avoid retyping the same long command? • Is there a trick for entering a long path quickly? • What should I say when someone asks if I know how to use vi? • How do I change my prompt to suit my mood or needs? • What is Command Line Tools for Xcode? • When it comes to package managers, which one should I use? Finally, to help you put it all together, the book showcases 67 real-world "recipes" that combine commands to perform useful tasks, such as listing users who've logged in recently, manipulating graphics, using a separate FileVault password, creating and editing user accounts, figuring out why a disk won't eject, copying the source code of a webpage, determining which apps have open connections to the internet, flushing the DNS cache, finding out why a Mac won't sleep, sending an SMS message, and deleting stubborn items from the Trash.




Macintosh Terminal Pocket Guide


Book Description

Unlock the secrets of the Terminal and discover how this powerful tool solves problems the Finder can't handle. With this handy guide, you'll learn commands for a variety of tasks, such as killing programs that refuse to quit, renaming a large batch of files in seconds, or running jobs in the background while you do other work. Get started with an easy-to-understand overview of the Terminal and its partner, the shell. Then dive into commands neatly arranged into two dozen categories, including directory operations, file comparisons, and network connections. Each command includes a concise description of its purpose and features. Log into your Mac from remote locations Search and modify files in powerful ways Schedule jobs for particular days and times Let several people use one Mac at the same time Compress and uncompress files in a variety of formats View and manipulate Mac OS X processes Combine multiple commands to perform complex operations Download and install additional commands from the Internet




Learning Unix for Mac OS X


Book Description

Now that your favorite operating system, Mac OS X, has Unix under the hood, it's the perfect time for you to uncover its capabilities. This new edition of Learning Unix for Mac OS X is designed to teach Unix basics to traditional Macintosh users. This book tells you what to do when you're faced with that empty command line. Book jacket.




Take Control of Shortcuts, 2nd Edition


Book Description

Automate your iPhone, iPad, or Mac! Version 2.1, updated January 30, 2023 Automation is no longer just for advanced computer users! Apple's Shortcuts app lets anyone with an iPhone, iPad, or Mac automate day-to-day tasks, from the simple to the complex. This book is a complete introduction to Shortcuts, covering every aspect of building, installing, debugging, running, syncing, and sharing shortcuts. It also includes step-by-step recipes for creating numerous useful shortcuts yourself. Apple's Shortcuts app brings extensive automation capabilities to your iPhone, iPad, or Mac, using a drag-and-drop, fill-in-the-blanks interface much like Automator—but much more powerful. It lets you perform sequences of tasks, including ones that span various apps, with just a tap, a click, or a voice command—or even automatically when certain conditions are met. Shortcuts can save you time and effort, help you accomplish previously complicated tasks, and let you customize your device to better meet your needs. Apple finally brought Shortcuts to the Mac in macOS 12 Monterey. (The book now includes coverage of macOS Ventura, iOS 16, and iPadOS 16.) But for all its utility, Shortcuts is not self-explanatory, so it can be challenging to figure out its quirks and create effective, time-saving automations. That's where Take Control of Shortcuts comes in. Written by automation expert Rosemary Orchard, this book opens the world of automation to users at every level. With Rosemary's help, you'll learn how to: • Navigate the Shortcuts app: Understand the user interface (on each platform) and terminology, then install and run your first shortcut. • Run shortcuts: Discover many different ways to run a shortcut, from tapping or clicking an icon to using Personal or Home automations, Siri, and Apple Watch. • Build shortcuts: Start with simple, one-step shortcuts and work your way up to complex shortcuts with input, output, variables, conditionals, loops, and more. Debugging advice is also included. • Install and sync shortcuts: Download and install shortcuts others have written, sync your shortcuts across your devices, and share them with other people. Then, to both illustrate the main principles you've learned and give you practical tools to get you started, Rosemary walks you step by step through the creation of 25 sample shortcuts, most which you can also download and install using links in the book. Examples include: • Event templates • A daily overview • Converting and sharing images • Adding a song to a playlist • Logging expenses • Turning on lights automatically when you get home • Disabling rotation lock just for YouTube on an iPhone • Reminding you about upcoming deadlines 15 minutes after you arrive home • Automatically setting seasonal scenes for HomeKit lights The book also discusses how Shortcuts can use REST APIs to talk to various web services (with detailed examples), and numerous complementary apps that work in conjunction with Shortcuts. Whether you're completely new to automation or already have significant programming experience, you'll find plenty of useful information in this friendly, practical guide.




The Linux Command Line, 2nd Edition


Book Description

You've experienced the shiny, point-and-click surface of your Linux computer--now dive below and explore its depths with the power of the command line. The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell (or command line). Along the way you'll learn the timeless skills handed down by generations of experienced, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more. In addition to that practical knowledge, author William Shotts reveals the philosophy behind these tools and the rich heritage that your desktop Linux machine has inherited from Unix supercomputers of yore. As you make your way through the book's short, easily-digestible chapters, you'll learn how to: • Create and delete files, directories, and symlinks • Administer your system, including networking, package installation, and process management • Use standard input and output, redirection, and pipelines • Edit files with Vi, the world's most popular text editor • Write shell scripts to automate common or boring tasks • Slice and dice text files with cut, paste, grep, patch, and sed Once you overcome your initial "shell shock," you'll find that the command line is a natural and expressive way to communicate with your computer. Just don't be surprised if your mouse starts to gather dust.




Mac Security Bible


Book Description

Your essential, no-holds-barred guide to Mac security threats and solutions Myth number one: Macs are safer than PCs. Not really, says author Joe Kissell, named one of MacTech's "25 Most Influential People" in the Mac community for 2008. In this timely guide, he not only takes you beyond the myths, he also delves into the nitty-gritty of each potential threat, helping you weigh the pros and cons of the solutions you might choose. Learn to measure risk versus inconvenience, make informed decisions, and protect your Mac computers, your privacy, and your data with this essential guide. Explains the security threats to Macs, including data in transit from your e-mail or network, and malware such as viruses, worms, and Trojan horses; these threats, formerly the exclusive worry of PC users, now increasingly threaten Macs Explores physical security and hardware barriers, software settings, third-party solutions, and more Shows Mac OS X users how to develop and enforce security policies Covers security for Windows running on a Mac with Boot Camp, virtualization software such as Parallels Desktop or VMware Fusion, and more Learn the full range of options you need to consider to make your Mac safe. Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.




The Mac OS X Command Line


Book Description

The Mac command line offers a faster, easier way to accomplish many tasks. It's also the medium for many commands that aren't accessible using the GUI. The Mac OS X Command Line is a clear, concise, tutorial-style introduction to all the major functionality provided by the command line. It's also packed with information the experienced users need, including little-known shortcuts and several chapters devoted to advanced topics. This is a book to get you started, but also a book you won’t soon outgrow.







Take Control of Your Digital Legacy, 2nd Edition


Book Description

Preserve your data for posterity! Version 2.0.1, updated February 2, 2024 How do you want to be remembered? A will takes care of your physical possessions, but what about your digital life—photos, email, files, online accounts, and so on? If you want to pass your electronic ephemera on as part of your digital legacy, turn to tech expert Joe Kissell for advice on dealing with large quantities of data, file formats, media types, the need for a “digital executor,” and more.n We all have digital data that's important to us now, but a lot of it could also be important to our children, friends, and relatives long after we're gone. But you have to take concrete steps now to make sure that data is preserved in the right way and handled according to your wishes. It’s not all about posterity either, since following Joe’s advice will also help loved ones access your key accounts and important info if you’re temporarily incapacitated, which can happen at any time. The book will help you with these essential tasks: • Identify your key digital assets: online accounts, photos, audio files, videos, passwords, documents, email, and more. • Plan for each type of digital asset based on your priorities for today, for shortly after you are no longer around, and for posterity. Joe explains the ideal file formats to use, how to deal with social media sites, the best ways to digitize paper documents and photos, and strategies for sharing passwords with family members, among much else. • Communicate your wishes in a “digital will” and designate someone to be its “digital executor.” The book includes a template document that you can develop into a personalized digital will. • Preserve your data for the future. You’ll consider types of archival storage media, cloud-based storage services, backups, and what instructions to provide about maintaining your data as file formats and storage media types evolve. Whether you just want to ensure that your heirs get copies of your favorite family photos and a few key documents or you want to catalog and preserve tens of thousands of digital items, this book helps you make smart decisions about your digital legacy. Questions answered include: • What strategies can I use for sorting and preserving email and instant messages? • How can I ensure that my email account(s) will be available to those wrapping up my estate? • What if I have digital data that should be destroyed when I die? • What should I do with my huge photo collection (both digital and paper)? • How should I pass on control of my Apple, Google, and Microsoft accounts? • How can I make my passwords and passkeys available to those who will need them—but keep them private for now? • What should I think about when handing down purchased audio and video files? • What should happen to my Facebook account when I’m no longer around? • What choices are available for keeping my digital archive available and backed up? • How long should I expect archival media to last? • Should I write an autobituary? • Are online digital legacy services any good? • How will organizing all this stuff benefit me while I’m alive?




Tweak Your Mac Terminal


Book Description

Look beyond the basics of Mac programming and development to become a Mac power user. When most people think about the Mac, they think about the amazing graphical user interface macOS is known for. However, there is a whole world to explore beneath the hood. This book approaches working directly in the terminal with fun projects and ideas to help turn you into an advanced Mac user. You'll work with Brew (HomeBrew), which gives you the ability to install applications from Linux (and Unix) that can make the terminal more useful. This is important, because a lot of applications have been stripped out of macOS or deprecated. For example, Apple's built-in PHP is usually a major release behind. You'll also customize your terminal to change everything about it, making it your own. The whole world is about personalizing. Why put up with the Apple defaults? Once you have your terminal set up and ready to rock, you'll review the basics of programming on the Mac terminal. This will allow you to get a taste of power scripting. You'll discover the power of bash, PHP, and Python. And then you'll apply those tools to web development. Tweak Your Mac Terminal takes you on a journey into a world of the terminal and its hidden applications. You will: Customize the terminal to make it perfect for your needs Develop web applications using basic coding skills in the terminal Install HomeBrew and by extension Linux and Unix applications.