Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
CentOS Quick Start Guide

You're reading from   CentOS Quick Start Guide Get up and running with CentOS server administration

Arrow left icon
Product type Paperback
Published in Dec 2018
Publisher
ISBN-13 9781789344875
Length 320 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Shiwang Kalkhanda Shiwang Kalkhanda
Author Profile Icon Shiwang Kalkhanda
Shiwang Kalkhanda
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with CentOS 7 FREE CHAPTER 2. Command-Line and Filesystem Navigation 3. Managing Text Files 4. User and Group Management 5. Managing File Permissions 6. Process Management 7. Managing Networking in CentOS 8. Software Package Management 9. Overview of Essential Advance Utilities 10. Other Books You May Enjoy

Redirecting output to files and programs

When we execute any program, by default, its output or error is displayed on the screen. We can redirect the text output of a program to a file using the input/output redirection operator or to another program using pipes. For this, when any command is executed, there are three standard file streams (file descriptors) created and opened by the operating system. The streams are known as standard input (stdin), standard output (stdout), and standard error (stderr).

The first stream is associated with stdin (numbered as 0) used to read input from keyboard. The second file stream is associated to stdout (numbered as 1) used by program to print output on screen, and the last file stream is stderr (numbered as 2), used by our program to print errors onscreen.

The following table list the different file descriptors (also known as channel) along...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image