O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Linux Shell Scripting Solutions

Video Description

Over 110 practical videos on real-world shell problems, guaranteed to make you wonder how you ever lived without them

About This Video

  • Execute a one-liner command sequence to perform text processing, dig data from files, back up sysadmin tools, and a lot more

  • Automate any administrative task you could imagine, all with shell script

  • Become an expert in creating powerful shell scripts and explore the full possibilities of the shell

  • In Detail

    The shell remains one of the most powerful tools on a computer system yet a large number of users are unaware of how much can be accomplished with it. Using a combination of simple commands, you will see how to solve complex problems in day-to-day computer usage.

    This video will take you through useful real-world examples to make your daily life easy when working with the shell. It shows you how to effectively use the shell to accomplish complex tasks with ease. Starting with the basics of the shell, you will learn simple commands and their usages, allowing you to perform operations on different kinds of files. We then explain text processing and web interaction, and conclude with backups, monitoring, and other sysadmin tasks.

    This is an an excellent guide on solving day-to-day problems using the shell and a few powerful commands together to create solutions.

    Table of Contents

    1. Chapter 1 : Shell Something Out
      1. Printing in the Terminal 00:06:04
      2. Playing with Variables and Environment Variables 00:07:22
      3. Function to Prepend to Environment Variables 00:02:18
      4. Math with the Shell 00:03:06
      5. Playing with File Description and Redirection 00:09:55
      6. Arrays and Associative Arrays 00:02:54
      7. Visiting Aliases 00:02:26
      8. Grabbing Information about the Terminal 00:02:00
      9. Getting and Setting Dates and Delays 00:04:43
      10. Debugging the Script 00:02:47
      11. Functions and Arguments 00:05:01
      12. Reading the Output of a Sequence of Commands 00:03:58
      13. Reading n Characters without Pressing the Return Key 00:01:48
      14. Running a Command Until It Succeeds 00:02:20
      15. Field Separators and Iterators 00:03:48
      16. Comparisons and Tests 00:07:09
    2. Chapter 2 : Have a Good Command
      1. Concatenating with cat 00:05:30
      2. Recording and playing Back of terminal sessions 00:02:51
      3. Finding files and file listing 00:18:44
      4. Playing with xargs 00:11:41
      5. Translating with tr 00:06:52
      6. Checksum and Verification 00:04:47
      7. Cryptographic Tools and Hashes 00:05:49
      8. Sorting Unique and Duplicates 00:08:38
      9. Temporary File Naming and Random Numbers 00:01:46
      10. Splitting Files and Data 00:04:53
      11. Slicing Filenames Based on Extension 00:05:00
      12. Renaming and Moving Files in Bulk 00:03:38
      13. Spell Checking and Dictionary Manipulation 00:02:21
      14. Automating Interactive Input 00:04:11
      15. Making Commands Quicker by Running Parallel Processes 00:03:10
    3. Chapter 3 : File In, File Out
      1. Generating Files of any Size 00:04:25
      2. The Intersection and Set Difference (A-B) on Text Files 00:03:58
      3. Finding and Deleting Duplicate Files 00:05:22
      4. Working with File Permissions, Ownership, and the Sticky Bit 00:09:07
      5. Making Files Immutable 00:02:14
      6. Generating Blank Files in Bulk 00:01:53
      7. Finding Symbolic Links and Their Targets 00:02:32
      8. Enumerating File Type Statistics 00:03:23
      9. Using Loopback Files 00:06:16
      10. Finding the Difference between Files, Patching 00:03:21
      11. Using Head and Tail for Printing the Last or First Ten Lines 00:04:16
      12. Listing Only Directories – Alternative Methods 00:01:48
      13. Fast Command-Line Navigation Using pushd and popd 00:03:44
      14. Counting the Number of Lines, Words and Characters in a File 00:01:47
      15. Printing the Directory Tree 00:03:19
    4. Chapter 4 : Texting and Driving
      1. Using Regular Expressions 00:09:36
      2. Searching and mining text inside a file with grep 00:11:18
      3. Cutting a File Column-Wise with Cut 00:04:47
      4. Using sed to Perform Text Replacement 00:07:09
      5. Using awk for Advanced Text Processing 00:10:13
      6. Finding Frequency of Words Used in a Given File 00:02:14
      7. Compressing or Decompressing JavaScript 00:04:58
      8. Merging Multiple Files as Columns 00:01:59
      9. Printing the nth Word or Column in a File or Line 00:01:26
      10. Printing Text between Line Numbers or Patterns 00:02:01
      11. Printing Lines in the Reverse Order 00:01:37
      12. Parsing E-mail Address and URLs from Text 00:02:13
      13. Removing a Sentence in a File Containing a Word 00:02:25
      14. Replacing a Pattern with Text in all Files in a Directory 00:01:47
      15. Text Slicing and Parameter Operations 00:02:37
    5. Chapter 5 : Tangled Web? Not at All!!
      1. Downloading from a Web Page 00:05:15
      2. Downloading a Web Page as Plain Text 00:01:37
      3. A Primer on cURL 00:07:11
      4. Parsing Data from a Website 00:01:05
      5. Image crawler and downloader 00:03:36
      6. Web photo album generator 00:01:54
      7. Creating a "define " Utility by Using the Web Backend 00:01:46
      8. Finding Broken Links in a Website 00:02:02
      9. Tracking changes to a website 00:01:48
      10. Posting to a Web Page and Reading Response 00:04:02
    6. Chapter 6 : The Backup Plan
      1. Archiving with tar 00:10:43
      2. Archiving with cpio 00:02:32
      3. Compressing data with gzip 00:05:28
      4. Archiving and Compressing with Zip 00:02:26
      5. Faster Archiving with pbzip2 00:03:16
      6. Creating filesystems with Compression 00:03:18
      7. Backup Snapshots with rsync 00:06:55
      8. Version Control-Based Backup with Git 00:05:05
      9. Creating entire disk images using fsarchiver 00:03:27
    7. Chapter 7 : The Old-Boy Network
      1. Let Us Ping! 00:04:54
      2. Listing All the Machines Alive on a Network 00:05:21
      3. Running Commands on a Remote Host with SSH 00:04:42
      4. Transferring Files through the Network 00:06:42
      5. Password-Less Auto-Login with SSH 00:03:44
      6. Port Forwarding and Mounting Remote Drives 00:05:22
      7. Network Traffic and Port Analysis 00:03:15
      8. Creating Arbitrary Sockets 00:02:46
    8. Chapter 8 : Put on the Monitors Cap
      1. Monitoring Disk Usage 00:10:18
      2. Calculating the Execution Time for a Command 00:06:29
      3. Collecting Information about Logged-in Users, Boot Logs, and Boot Failures 00:04:12
      4. Listing the Top ten CPU Consuming Processes in an Hour 00:02:48
      5. Monitoring Command Outputs with Watch 00:01:42
      6. Logging Access to Files and Directories 00:02:44
      7. Logfile Management with logrotate 00:04:14
      8. Logging with syslogd 00:02:45
      9. Monitoring User Logins to Find Intruders 00:05:24
      10. Remote Disk Usage Health Monitor 00:03:17
      11. Finding Out Active User Hours on a System 00:03:15
      12. Measuring and Optimizing Power Usage 00:02:00
      13. Monitoring Disk Activity 00:01:41
      14. Checking Disks and Filesystems for Errors 00:03:57
    9. Chapter 9 : Administration Calls
      1. Gathering Information about Processes 00:15:05
      2. Killing Processes and Send or Respond to Signals 00:06:02
      3. Sending Messages to User Terminals 00:03:04
      4. Gathering System Information 00:01:57
      5. Using /proc for Gathering Information 00:01:52
      6. Scheduling with cron 00:07:13
      7. Writing and Reading the MySQL Database from Bash 00:06:40
      8. User Administration Script 00:05:17
      9. Bulk Image Resizing and Format Conversion 00:05:31
      10. Taking Screenshots from the Terminal 00:01:27
      11. Managing Multiple Terminals from One 00:03:36