Skip to Main Content
CentOS Bible
book

CentOS Bible

by Christopher Negus, Timothy Boronczyk
August 2009
Beginner content levelBeginner
984 pages
26h 2m
English
Wiley
Content preview from CentOS Bible

Chapter 11. Automating System Tasks

You'd never get any work done if you typed every command that needs to be run on your CentOS system when it starts. Likewise, you could work more efficiently if you grouped together sets of commands that you run all the time. Shell scripts can handle these tasks.

A shell script is a group of commands, functions, variables, or just about anything else you can use from a shell. These items are typed into a plaintext file. That file can then be run as a command. CentOS uses system initialization shell scripts during system startup to run commands needed to get things going. You can create your own shell scripts to automate the tasks you need to do regularly.

This chapter provides a rudimentary overview of the inner workings of shell scripts and how they can be used. You learn how shell scripts are responsible for the messages that scroll by on the system console during booting and how simple scripts can be harnessed to a scheduling facility (such as cron or at) to simplify administrative tasks.

You also learn to fine-tune your machine to start at the most appropriate run level and to run only services you need. With that understanding, you'll be able to personalize your computer and cut down on the amount of time you spend repetitively typing the same commands.

Understanding Shell Scripts

Have you ever had a task that you needed to do over ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Definitive Guide to CentOS

The Definitive Guide to CentOS

Peter Membrey, Tim Verhoeven, Ralph Angenendt
Troubleshooting CentOS

Troubleshooting CentOS

Jonathan Hobson
Running Linux, 5th Edition

Running Linux, 5th Edition

Matthias Kalle Dalheimer, Matt Welsh
The Official Ubuntu Book

The Official Ubuntu Book

Benjamin Mako Hill, Jono Bacon, Corey Burger, Jonathan Jesse, Ivan Krstić

Publisher Resources

ISBN: 9780470481653Purchase book