Bash Scripting Advanced Bash Scripting Course: Your Pathway to Command-Line Mastery In the dynamic world of DevOps and system administration, command-line proficiency is a crucial skill. Bash, one of the most widely used command-line shells - and the default for most Unix-based systems, including popular Linux distributions - offers immense power and versatility. Mastering Bash scripting can give you a competitive
free week Unlock DevOps Mastery with KodeKloud's Free Week Unlock unparalleled DevOps expertise with KodeKloud's Free Week. Dive into specialized courses, hands-on labs, and gain insights from industry leaders. Embrace this transformative journey and redefine your DevOps potential.
Bash Scripting How to Use Bash Getopts With Examples Getopts is a powerful shell command used to parse command line options and arguments. It provides a structured way to handle complex input patterns, thereby making your scripts more readable and maintainable. In this blog post, we’ll start with an understanding of what positional parameters are and their inherent
Bash Scripting How to Return Value From a Bash Function Bash, one of the most popular shell scripting languages, handles functions a little differently from what you might expect if you're coming from other programming languages. In particular, returning values from Bash functions can be a bit tricky to understand for newcomers. In this blog post, we’ll start by
Bash Scripting How to Extract Bash Substring Extracting substrings from a larger string is a fundamental operation in text manipulation, which is an essential skill in Bash scripting. In this blog post, we'll explore three methods that you can use to extract substrings in Bash. We will first look at using Bash's built-in parameter expansion for this
Linux 4 Commands to Check File Size in Linux Whether you need to manage disk space, transfer files over the network, or optimize system performance, knowing the file sizes in a Linux system plays a critical role. In this blog post, we’ll explore four different methods you can use to determine a file's size in Linux. Let’s
Bash Scripting Eof Bash: What Is It and How Does It Work? Have you ever come across the term EOF in a Bash script and wondered what it means or how to utilize this feature effectively? If you've found yourself asking these questions, then you're in the right place. In this blog post, we’ll dive deep into the concept of EOF
Bash Scripting How to Convert Bash String to Lowercase String manipulation is a fundamental aspect of scripting in any programming language, and Bash is no exception. One such common task is to convert the case of strings, which is particularly useful in text processing and analysis. In this blog post, we’ll explore two methods of converting Bash string
Bash Scripting Bash Compare Strings: How to Check if Two Strings Are Equal Whether you’re validating user input or processing text data, knowing how to compare strings is an important skill. In this blog post, we’ll look at four different methods you can use to check if two strings are equal. We’ll use examples to explain each method, providing you
Bash Scripting How to Make a Bash Script File Executable in Linux A Bash script is essentially a text file containing a series of commands. To make a Bash script file executable means giving it permission to be run as a program. In this blog post, we'll start by taking a deep dive into the concept of file permissions in Linux. We'll
Linux How to Search Packages With Apt Search Command When you want to install a package on Debian-based Linux distributions using apt, you need to know the exact name of the package. But what if you don’t remember the name? Maybe you remember a portion of a multi-word package name or a few distinct characters. How do you
Linux How to Count the Number of Files in a Directory in Linux Working with Linux often involves dealing with files. One common but deceptively complex task is counting the number of files in a directory. In this blog post, we will explore three different methods for counting the number of files in a directory, each with its own benefits and nuances. Let’
Bash Scripting How to Check if a File Exists in Bash Let's say you're creating a Bash script to save some data in a file. It's important to ensure that the file exists before you try to write to it. If not, your script may not work as expected. This is just one example. In your Bash scripting journey, you’ll
Linux How to Find Out When a File Was Created in Linux Keeping track of files in Linux is an important part of system administration. Whether you're investigating a security issue or debugging a program, the details of when a file was created can provide essential insights. In this blog post, we’ll explore three methods of finding out when a file
Bash Scripting How to Read a File Line by Line in Bash When dealing with scripting and automation, file manipulation is an essential skill. Whether you’re analyzing log files, processing data sets, or parsing configuration files, the ability to read and interpret file content is critical. In this blog post, we’ll learn how to read a file line by line
shell scripting How to Run Shell Script (.sh) Files in Linux Shell scripts play an important role in the world of Linux. They help automate repetitive tasks and streamline complex procedures. This doesn’t just save users’ time—it significantly reduces the chance of human errors, resulting in more reliable outcomes and improved system stability. In this blog post, we’ll
Bash Scripting How to Write Bash Scripts to Loop Through Array Values Looping through array values is a common task in Bash scripting. For instance, you might want to loop through an array of filenames and execute specific commands on each one. In this blog post, you’ll learn how to write bash scripts that utilize for loops to iterate through array
Docker How to Build a Docker Image With Dockerfile From Scratch Containers have become the preferred method for packaging and deploying applications in modern software development. Among container platforms, Docker has emerged as the most popular choice for building and managing these containers. Before we can run an application as a container using Docker, we must first build a Docker image.
DevOps SRE vs. DevOps: Understanding The Key Differences If you are interested in software development and IT operations, you may have heard of two popular terms: SRE and DevOps. But what do they mean, and how do they differ? Key Takeaway * SRE and DevOps are two approaches that aim to improve the reliability and speed of software development
Docker How to Pass Environment Variables to Docker Containers? Containerized applications can run seamlessly across a variety of environments, including development, testing, and production. As these applications move from one environment to another, they often require some configurations to be adjusted to meet each environment's unique needs. For example, in a development environment, enabling verbose debugging can provide developers
Kubernetes How to Restart a Pod in Kubernetes Restarting a Pod is a common operation in Kubernetes. There are several reasons why you might want to restart a Pod. For example, you might want to update the container image to a newer version or modify the environment variables to adjust how your application works. In this blog post,
Docker compose Docker-Compose Logs: How to View Log Output? As you deploy containerized applications using Docker, you may occasionally encounter issues that prevent your applications from running as expected. This is where effective troubleshooting becomes essential, and logs serve as your best tool for this purpose. Logs are detailed records of the events that occur within an application. They
Kubernetes Kubectl Rollout Restart: What Is It and How to Use It? In Kubernetes, kubectl rollout restart is a command used to start a new rollout process for three specific Kubernetes objects: Deployment, DaemonSet, and StatefulSet. A rollout process essentially means a gradual, step-by-step recreation of Pods — The old Pods are not removed entirely until the new Pods are running successfully. This
Kubernetes How to Debug CrashLoopBackOff in a Container or Pod When trying to get your containerized application up and running in a Kubernetes cluster, you may run into errors that prevent the application from running. One such error is CrashLoopBackOff. In this blog post, we’ll learn how to debug the CrashLoopBackOff status of a Pod. Our approach? We’ll
Kubernetes Logs kubectl logs: How to Get Pod Logs in Kubernetes (With Examples)? Kubernetes is a container orchestration tool used to deploy and manage containerized applications. Like any software, these applications can sometimes fail or not perform as expected due to various reasons. When such failures occur, it’s important to identify and rectify the issue quickly. One key aspect of troubleshooting involves