Chapter 16: Shell Script Examples for Server Management, Network Configuration, and Backups

Now that we've covered everything that we wanted to cover in terms of various concepts and structures in Bash shell scripting, let's dig into some examples. This will allow us to put these last few chapters to good use as shell scripts are the most commonly used tools in system engineers' daily jobs. Due to this, we are going to go through some shell scripts to emphasize the point of scripting – to make our lives a lot easier.

In this chapter, we're going to cover the following recipes:

  • Creating a file and folder inventory
  • Checking if you're running as root
  • Displaying server stats
  • Finding files by name, ownership, or content type and copying them to ...

Get Linux Command Line and Shell Scripting Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.