Mukul Latiyan

Mukul Latiyan

363 Articles Published

Articles by Mukul Latiyan

Page 13 of 37

How to use chmod recursively on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 517 Views

chmod is a Linux command that changes file and directory permissions. When working with complex directory structures, you often need to modify permissions not just for a single file, but for all files and subdirectories within a directory tree. This is where the recursive option (-R) becomes essential. In Linux, file permissions control who can read, write, or execute files and directories. The chmod command allows you to modify these permissions using either symbolic notation (like rwx) or numeric notation (like 755). Basic chmod Syntax chmod [OPTIONS] MODE file... chmod [OPTIONS] NUMERIC_MODE file... chmod [OPTIONS] --reference=RFILE ...

Read More

Array Operations in Linux bash

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 951 Views

Bash scripts are one of the most convenient approaches for automating command line processes. They help us perform multiple operations in a simpler and more understandable manner, allowing us to accomplish tasks similar to other programming languages. Arrays in bash provide a powerful way to store and manipulate collections of data elements. The syntax of bash can be tricky at first, but this tutorial will explain the essential array operations step by step. We'll explore how to create, access, and manipulate arrays using practical examples that you can run directly in your terminal. How to Create and Execute ...

Read More

How to use the grep command to search for a string that has a dot in it?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 862 Views

In order to be able to grep a string that has a dot inside it, we must first understand what a grep command is and how to use it on Linux. The grep command in Linux is used to filter searches in a file for a particular pattern of characters. It is one of the most used Linux utility commands to display the lines that contain the pattern that we are trying to search. Normally, the pattern that we are trying to search in the file is referred to as the regular expression. Syntax grep ...

Read More

How to use the sed command to replace a text in files present in a directory and subdirectories?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 869 Views

Let's consider a case where we have two directories, say, d1 and d2 and both these directories contain some files, which may be the same or different. Now we want to make use of the sed command to replace a particular text that might be present in some of the files in either the d1 directory or the d2 directory. The sed command, which is short for stream editor, is used to perform different functions like find, replace, insert and many more on a particular file. When combined with the find command, it becomes a powerful tool for batch ...

Read More

How to use the sub process module with pipes on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 540 Views

In Python, the subprocess module allows us to work with additional processes and provides a high-level interface for executing system commands. While other modules like os.spawn(), os.system(), and os.popen() offer similar functionality, subprocess is recommended because it provides better control, security, and flexibility. When working with subprocess on Linux, pipes allow us to chain commands together, passing the output of one command as input to another. This is essential for building secure command pipelines without shell injection vulnerabilities. Basic Subprocess Example Let's start with a simple example that demonstrates basic subprocess usage: import subprocess ...

Read More

How to write multiple line strings using Bash with variables on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 4K+ Views

Bash supports multiple approaches for creating and handling multiline strings. This functionality is essential when working with formatted output, configuration files, or complex text processing tasks in shell scripts. There are three primary methods to create multiline strings in Bash, each with its own advantages depending on the use case. Method 1: Using Escape Sequences The simplest approach uses the newline character to separate lines within a string. This method works well for short strings and when you need precise control over formatting. Example #!/bin/bash approach1="First Line TextSecond Line TextThird Line Text" ...

Read More

Best Command Line HTTP Client for Linux

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 3K+ Views

In this tutorial, we will explore some of the most commonly used and famous HTTP clients that are present in Linux. A HTTP Client is a software that is mainly used to allow us to download files from the Internet. The primary reason for using HTTP clients is generally to download files, but these can also be used in case we want to debug or interact with a web server or multiple web servers. Now, let's consider the most famous HTTP Clients that are used. HTTPie With the name that almost resembles of the famous web protocol ...

Read More

How would I get a cron job to run every 30 minutes on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 1K+ Views

Crontab is a time-based job scheduler in Linux that allows you to automate the execution of commands, scripts, or programs at specific intervals. To create a cron job that runs every 30 minutes, you need to understand the crontab syntax and configure the appropriate time specification. Understanding Crontab Syntax A cron job entry consists of five time fields followed by the command to execute: * * * * * command_to_run | | | | | | | | | +-- Day of Week (0-6, Sunday=0) | | | +---- Month (1-12) | | +------ Day of ...

Read More

Is there a goto statement available in bash on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 2K+ Views

Bash on Linux does not have a built-in goto statement. Unlike languages such as C or BASIC, bash lacks native goto functionality, and no official control structures exist in the bash documentation to provide direct jump capabilities. However, we can simulate goto-like behavior using alternative approaches with break, continue, and conditional statements. Alternative Approaches to Goto While bash doesn't support goto directly, there are several ways to achieve similar control flow behavior. Method 1: Using Conditional Statements The simplest way to skip code blocks is using if statements with conditions that control execution flow − ...

Read More

Linux – How to resolve the error "can't connect to Docker daemon

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 340 Views

The "can't connect to Docker daemon" error is one of the most common issues that new Docker users encounter when trying to start Docker services. This error typically appears when attempting to run Docker commands like docker-compose build or other Docker operations. The docker-compose command is a tool used for defining and running multi-container Docker applications. When the Docker daemon is not properly running or accessible, you'll see an error message like this: Cannot connect to the Docker daemon. Is the docker daemon running on this host? Common Causes This error occurs due to ...

Read More
Showing 121–130 of 363 articles
« Prev 1 11 12 13 14 15 37 Next »
Advertisements