Found 2065 Articles for Operating System

Introduction to fzf command in Linux

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

274 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

22K+ 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

5K+ 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

401 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

415 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

403 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

347 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

Skip Hidden Files and Directories During Recursive Copy

Kunal Verma
Updated on 23-Mar-2023 18:24:41

959 Views

Abstract On the Linux command line, cp -r can be the first command that appears when we want to copy directories recursively. Dotfiles are understood to function under Linux as hidden files. We occasionally exclude hidden files and directories from directories while copying them recursively. We'll learn how to do it in this tutorial. Note − Linux commands are case-sensitive. SCP command Using the command-line tool SCP (secure copy), you can safely move files and directories between two places. We can copy a file or directory with scp from a local system to a remote system, from a remote ... Read More

Parse Command Line Arguments in Bash on Linux

Kunal Verma
Updated on 23-Mar-2023 18:23:59

2K+ Views

Abstract Command-line arguments can be entered sequentially or processed into options by bash programs. These arguments are used by command-line utilities to selectively select between execution environments or conditionally trigger functions in a Bash script. They can be set up in various ways in Bash. Note − Linux commands are case-sensitive. getopt Syntax The Syntax for getopts is − $ getopts optstring opt [arg ...] The following applies to the aforementioned function − The options are represented by an optstring. If there is a colon (:) following the option, it expects a response. In the optstring, option c, ... Read More

Advertisements