Found 1437 Articles for Linux

Introduction to Bash Array in Linux

Satish Kumar
Updated on 24-Mar-2023 15:29:24

632 Views

Introduction Bash is a popular command-line shell used in Linux and other Unix-based operating systems. One of powerful features of Bash is its support for arrays. An array is a collection of values that can be accessed using an index. In this article, we will discuss basics of Bash arrays and how they can be used in Linux. What is a Bash Array? A Bash array is a variable that can hold multiple values. values are stored in consecutive memory locations and can be accessed using an index. index of first element in array is 0, and index of last ... Read More

Understanding Time Command in Linux

Satish Kumar
Updated on 24-Mar-2023 15:27:06

355 Views

As a Linux user, you must have come across time command. It is a simple yet powerful command that allows you to measure execution time of a process. Whether you are a developer, system administrator, or just a curious user, understanding how time command works is essential for optimizing your workflow and identifying bottlenecks in your system. In this article, we will dive deep into time command in Linux and explore its various use cases. What is time command? The time command is a Linux utility that measures time it takes for a given command to execute. command accepts a ... Read More

Introduction to fzf command in Linux

Satish Kumar
Updated on 24-Mar-2023 15:26:09

305 Views

Introduction Linux command-line interface is one of most powerful tools available to system administrators and developers for managing and working with their systems. One of challenges with CLI is that it requires memorizing many commands and options. However, there are tools that make it easier to navigate command line, such as fzf command. In this article, we will introduce fzf command, how it works, and its features. What is fzf? fzf is a command-line fuzzy finder, which allows you to easily search through files, directories, and other types of data. It is a highly customizable tool that can be used ... Read More

Linux source Command

Satish Kumar
Updated on 24-Mar-2023 15:24:43

24K+ Views

Introduction The Linux source command is an essential tool for Linux users and administrators. It is used to execute a script file in current shell environment, and it allows you to modify current shell environment in same way that you would if you had typed commands manually. In this article, we will explore Linux source command and its various applications. What is Linux source command? The Linux source command is a shell command that reads and executes commands from a file in current shell environment. file is typically a shell script, but it can also be any text file containing ... Read More

Process Memory Management in Linux

Satish Kumar
Updated on 24-Mar-2023 15:23:51

6K+ Views

Process memory management is a crucial aspect of any operating system. In Linux, memory management system is designed to efficiently manage memory usage, allowing processes to access and use memory they require while preventing them from accessing memory they do not own. In this article, we will discuss process memory management in Linux in detail, covering various aspects such as memory allocation, virtual memory, memory mapping, and more. Memory Allocation Memory allocation is process of assigning memory to a process or program. In Linux, kernel provides two main methods for memory allocation: static and dynamic. Static Memory Allocation Static memory ... Read More

Linux Job Control &, disown, and nohup

Satish Kumar
Updated on 24-Mar-2023 15:23:28

452 Views

Introduction Linux is an open-source operating system that is widely used in industry. One of most notable features of Linux is its command-line interface (CLI), which provides a lot of flexibility and power to users. When working in command line, it is common to run multiple commands concurrently. However, sometimes, you may want to control how these commands are executed and how they interact with each other. This is where job control comes in. Job Control Job control refers to ability to manage and manipulate running processes in a Linux system. It allows users to start, stop, pause, resume, and ... Read More

Read Random Line From a File in Linux

Satish Kumar
Updated on 24-Mar-2023 15:20:44

1K+ Views

In Linux, reading a random line from a file can be a useful task in various scenarios. For example, when you want to select a random word from a dictionary or randomly select a line from a log file for analysis purposes. There are several ways to read a random line from a file in Linux. In this article, we will explore different methods to achieve this task along with their pros and cons. Method 1: Using shuf Command The shuf command is a simple and efficient way to read a random line from a file in Linux. shuf command ... Read More

How to Call an External Program Using awk

Satish Kumar
Updated on 24-Mar-2023 15:20:03

506 Views

Introduction Awk is a powerful text processing tool that can be used to automate various tasks such as data manipulation, filtering, and reporting. One of interesting features of awk is its ability to call external programs from within script. In this article, we will explore how to call an external program using awk. Understanding System() Function The system() function is used to execute external commands from within awk. syntax of system() function is as follows − system(command) The command argument is external command that we want to execute. When system() function is executed, awk passes command argument to ... Read More

The “Oldconfig” Target In The Linux Kernel Makefile

Kunal Verma
Updated on 23-Mar-2023 18:27:12

457 Views

Abstract The Linux kernel is the core component of the Linux operating system, and it is responsible for managing system resources and providing various services to user space applications. Building the Linux kernel from source is a common task for developers and system administrators, and the Makefile is the primary tool used for this purpose. One of the targets provided by the Makefile is the "oldconfig" target, which is used to update the kernel configuration file based on the current system configuration. In this tutorial, we will explain the "oldconfig" target and how to use it. Note − Linux commands ... Read More

Testing Bash Scripts With Bats in Linux

Kunal Verma
Updated on 23-Mar-2023 18:26:13

412 Views

Abstract There are countless applications for the widely used and beneficial scripting language bash. Despite the fact that the language itself is widely used, testing it is not as common. This may result in expensive mistakes and reduced trust in the code. In this article, we are going to understand how to test bash scripts with the Bats in the Linux. Note − Linux commands are case-sensitive. What is BATS? Bash Automated Testing System, sometimes known as BATS, is a testing framework. Before a bash program is released, it may be verified using this automated testing procedure that it is ... Read More

Advertisements