Introduction When working in Linux, it's common to encounter large files that need to be compressed for storage or transfer. One popular compression tool available in Linux is gzip, which is used to compress files to save disk space and reduce transfer time. In this article, we'll explore how to use gzip and gunzip in Linux, including how to compress and decompress files, and how to work with compressed archives. What is gzip? Gzip is a compression utility tool used in Linux and other Unix-based systems. It's used to compress and decompress files, reducing their size for storage and transfer. ... Read More
Introduction Linux is an open-source operating system that provides users with a wide range of features and functions. One of essential aspects of Linux is use of shared objects (so) files. Shared objects are files that are used by Linux programs to share code and data between different processes. In this article, we will discuss how shared object filenames work in Linux and provide examples to illustrate concepts. What are Shared Objects (so) Files? Shared objects are a type of file that contains code and data that can be shared between multiple processes in Linux. They are similar to dynamic ... Read More
Bash is a shell language used in Linux systems that allows users to interact with system through command-line interface. Bash offers several string manipulation capabilities that can help users manipulate and process text strings. In this article, we will explore various techniques available for string manipulation in Bash. Basic String Operations Bash provides basic operations for manipulating strings. To create a string variable in Bash, you simply assign a value to a variable name − mystring="Hello, world!" To display contents of string variable, you can use echo command − echo $mystring The output will be − Hello, world! ... Read More
As a Linux user, it is common to come across situations where you need to reverse order of lines in a file. This could be necessary when you want to read a file in a reverse order or when you want to perform certain operations that require content of a file to be in reverse order. In this article, we will explore how to reverse order of lines in a file in Linux. Introduction to Linux Commands for Reversing Order of Lines in a File Linux provides several commands that can be used to reverse order of lines in a ... Read More
Introduction Text files are widely used for storing data and information in various fields such as computer science, engineering, healthcare, finance, etc. However, sometimes it is necessary to remove certain lines that contain specific strings or patterns from a text file. This task can be accomplished easily using various programming languages such as Python, Perl, Bash, etc. In this article, we will focus on how to delete lines in a text file that contain a specific string. Prerequisites Before proceeding further, we need to make sure that we have following prerequisites − A text file containing data and information. ... Read More
In Linux, it is often useful to randomize lines of a file. This can be helpful when working with large datasets or when performing certain operations that require lines of a file to be in a random order. In this article, we will discuss different ways to randomize lines in a file in Linux. Using 'shuf' command The 'shuf' command is a Linux utility that can be used to randomly shuffle lines in a file. To use 'shuf' command, you need to have it installed on your system. Most Linux distributions come with 'shuf' pre-installed, but if it is not ... Read More
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
Introduction Docker Compose is a tool for defining and running multi-container Docker applications. It allows developers to define their application stack as a YAML file, making it easy to spin up complex environments with just a few commands. However, using private repositories with Docker Compose can be tricky. In this article, we'll explore how to use Docker Compose with private repositories, covering different authentication methods and their examples. What are Private Repositories? Docker images can be stored in private or public repositories. Public repositories are open to everyone, while private repositories require authentication to access them. Private repositories are often ... Read More
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 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