Book Image

Hands-On Linux Administration on Azure - Second Edition

By : Kamesh Ganesan, Rithin Skaria, Frederik Vos
Book Image

Hands-On Linux Administration on Azure - Second Edition

By: Kamesh Ganesan, Rithin Skaria, Frederik Vos

Overview of this book

Thanks to its flexibility in delivering scalable cloud solutions, Microsoft Azure is a suitable platform for managing all your workloads. You can use it to implement Linux virtual machines and containers, and to create applications in open source languages with open APIs. This Linux administration book first takes you through the fundamentals of Linux and Azure to prepare you for the more advanced Linux features in later chapters. With the help of real-world examples, you’ll learn how to deploy virtual machines (VMs) in Azure, expand their capabilities, and manage them efficiently. You will manage containers and use them to run applications reliably, and in the concluding chapter, you'll explore troubleshooting techniques using a variety of open source tools. By the end of this book, you'll be proficient in administering Linux on Azure and leveraging the tools required for deployment.
Table of Contents (14 chapters)
13
Index

Working with Text Files

The Unix philosophy started by Ken Thompson aimed to create a capable operating system with a small footprint and a clean user interface. Because part of the Unix philosophy is to write programs to handle text streams, because that is a universal interface, communication between programs, configuration files, and many other things is implemented in plain text. This section is all about handling plain text.

Reading Text

On the most fundamental level, reading the content of a file in plain text format means taking the content of this file and redirecting it to the standard output. The cat command is one utility that can do that—concatenate the content of one or more files (or another input channel) to the standard output:

Reading the contents of the file /etc/shells using the cat utility.
Figure 3.10: Using the cat command to generate standard output

Some nice parameters of this utility are:

  • -A: Show all non-printable characters
  • -b: Number lines, including empty lines
  • ...