Found 717 Articles for Linux

Pipes and Redirection in Linux

Bamdeb Ghosh
Updated on 29-Mar-2023 11:40:55
Introduction Pipes and redirection are two different kinds of mechanisms used in Linux. Sometimes, we need the output of a command to be passed as input of another command and do some operation. There we use the pipe operator. The operator is “|”. It’s found on top of the “Enter” key. Sometimes, we redirect or pass all the output of a command to a file for storing purposes. Also, we take a file’s content as input for a command. This is called redirection and operators are used like “>”, “>>” and “” to do this operation. In the first example, ... Read More

Modify Files in Linux using vi, nano or emacs

Bamdeb Ghosh
Updated on 29-Mar-2023 11:38:17
Introduction Linux users frequently utilize Vi, Nano, and Emacs as their preferred text editors. Vi is a standard editor that is revered for its advanced functionalities and efficiency. Conversely, Nano is a straightforward editor that boasts a user-friendly interface and is easily learned by novices. Emacs is a powerful and customizable editor with a complex user interface that is ideal for advanced users. In this article, we are going to learn how to modify files in Linux using “vi, nano, and emacs”. Our discussion will encompass the installation process of each editor, their respective functions, as well as examples demonstrating ... Read More

Introduction to File MIME Types on Linux

Bamdeb Ghosh
Updated on 29-Mar-2023 11:36:40
Introduction MIME types are a crucial aspect of Linux file management, as they enable the operating system to identify the file format and determine the appropriate program for opening the file. Understanding MIME types can be beneficial, especially when dealing with various file formats on Linux systems. This article provides an overview of MIME types and explains how to determine the MIME type of a file on Linux. It also introduces the xdg-mime command, a powerful tool for managing MIME types on Linux, allowing users to change the default application associated with a particular file type or add new MIME ... Read More

Introduction to File Locking in Linux

Bamdeb Ghosh
Updated on 29-Mar-2023 13:58:03
Introduction File locking is a mechanism used to restrict access to a file to only one process or user at a time. It is essential in multi-user systems to avoid conflicts when multiple processes try to access the same file simultaneously. In Linux, file locking is implemented through the use of locks. Lock prevents other processes from accessing a file until the lock is released. In this article, we will explore file locking in Linux and how to implement it using C code. We will discuss the different types of file locks, how to create and release locks, and how ... Read More

How to Use Command Line Arguments in a Bash Script

Bamdeb Ghosh
Updated on 29-Mar-2023 11:20:51
Introduction In general, there are many ways to pass input to programming or scripting languages and sometimes there is a need to pass input from the command line instead of input from the code. Like any other programming or scripting language bash scripting also support the command-line argument. In this article, we will try to explore the syntax for command-line arguments and then we will see some examples for command-line arguments and discuss the special variables. Command-line Argument Syntax We already know how to run a bash script in Linux. We can use either bash or sh command and then ... Read More

How do I Zip/Unzip on the Unix Command Line

Bamdeb Ghosh
Updated on 29-Mar-2023 11:18:50
Introduction Zipping and unzipping a file is a very common practice in Linux. We need to zip many files into one file for the following reasons. It saves disk space in the system. We can keep multiple files inside one file. This also helps to copy this zipped file to another system. When we have one zipped file, we should also know how to unzip it to get all the required files. So, zipping and unzipping commands are very important in Linux. In this article, we are going to learn on various commands for zipping and then unzipping. ... Read More

Guide to Useful File Manipulation Commands

Bamdeb Ghosh
Updated on 29-Mar-2023 11:15:00
Introduction File manipulation commands are some of the most commonly used and important tools available to users. Whether you're a software developer, data analyst, or just an everyday computer user, file manipulation commands allow you to quickly and easily navigate, manipulate, and manage files on your system. Let’s explore some of the most useful file manipulation commands that you can use in a terminal. These commands are essential for anyone who works with files on a regular basis and can greatly improve your efficiency and productivity. By mastering these file manipulation commands, you can become a more efficient and productive ... Read More

Guide to the Linux read Command

Bamdeb Ghosh
Updated on 29-Mar-2023 11:11:53
Introduction As we work with the Linux command line, we often need to interact with input from the user or from files. This is where the "read" command comes in handy. It is a simple yet powerful command that can be used in a variety of ways to process input in Linux. By learning how to use the read command in various ways, we can become more proficient in using this command and automate tasks more efficiently. Let us cover all the methods and formats of the Linux read command. We will start with the basics, including how to read ... Read More

Guide to the AWK Programming Language on Linux

Bamdeb Ghosh
Updated on 29-Mar-2023 11:08:00
Introduction AWK is a scripting language utilized for text processing in Linux. It's designed to manipulate data in text files, making it an ideal tool for data analysis and management tasks. With a range of built-in functions and operators, AWK can perform simple search and replace tasks or complex data transformations. Its concise syntax and versatility allow for easy manipulation of text files. AWK is a powerful tool for those who work with text files in Linux environments. Let us provide a beginner's guide to the AWK programming language on Linux. We will cover the basic syntax of the language, ... Read More

Guide to Linux jq Command for JSON Processing

Bamdeb Ghosh
Updated on 29-Mar-2023 13:58:48
Introduction JSON (JavaScript Object Notation) is a popular data format used for exchanging information between applications. It is a lightweight and easy-to-understand. To process JSON data efficiently, Linux provides a command-line tool called jq. This powerful tool enables users to extract, manipulate, and transform JSON data with ease. With jq, users can quickly perform a wide range of tasks on JSON data, including filtering, sorting, and selecting specific fields. Additionally, jq supports a variety of output formats, making it easy to integrate with other command-line tools. In this article, we will explore the jq command and its various features and ... Read More
Previous 1 ... 3 4 5 6 7 ... 72 Next