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
Abstract Remote management of UNIX/Linux/BSD servers via an ssh session is a common practice. For installation, you might need to download the software or other files. For Linux operating systems, a few strong graphical download managers are available. However, the non-interactive downloader is preferred when using the wget command at the command line or shell prompt. The wget command supports a wide range of settings and Internet protocols, including HTTP, FTP, HTTPS, and others. One of the simplest uses of the wget command is to download a single file and place it in the directory where you are currently working. ... Read More
Abstract When working in a Linux environment, you have the freedom to decide how you want to download your files from a transparent URL. The majority of users are accustomed to Linux's interactive method of downloading such files. This interactive method involves using a web browser, where a user clicks on a download button that is available and waits until the file download has begun and is successfully finished. An alternate method for obtaining network-based files through a non-interactive or command-line environment is the free GNU software Wget. The Wget utility's non-interactive property suggests that your file downloads can proceed ... Read More
Abstract On Linux servers under heavy load, "too many open files" problems occur frequently. It denotes that a process is unable to open new files (file descriptors) because it has opened too many already. The "max open file limit" is predetermined by default for each process or user on Linux, and the settings are modest. The number of concurrent files descriptor users and processes is constrained. The "Too many open files error" appears when the limit is reached when the user or process tries to open more file descriptors. Therefore, increasing the maximum number of file descriptors a user or ... Read More
Abstract There may be a situation where, despite the fact that no one is attempting to access the share to your knowledge, you are unable to unmount it. This is typically seen while mounting a share. The potential error that you could experience is "the file is busy", or we may occasionally see the notice "the file is busy" when attempting to access a file. This indicates that a process is active on the system that is using the file and keeping it open for reading or writing. Sometimes, when this occurs, we'll want to figure out which process is ... Read More
Introduction In a Linux operating system, every hardware device and most software components are represented as files in /dev directory. Three commonly used devices in /dev directory are devconsole, devtty, and devtty0. These devices are essential for debugging and troubleshooting purposes. However, they have different functionalities and can be confusing for beginners. In this article, we will explain difference between devconsole, devtty, and devtty0, their uses, and how to interact with them. What is Devconsole? Devconsole is a virtual device file that represents console, which is default terminal on a Linux system. It is also known as kernel console or ... Read More
Introduction In world of computing, data compression has become a crucial tool in many applications. It is used to reduce size of files, improve transfer speed, and save storage space. Linux operating systems come with a wide range of compression tools, including popular gzip and bzip2. However, there is another compression tool that is becoming increasingly popular in Linux world, and that is xz compression. In this article, we will explore what xz compression is, how it works, and how to use it effectively in Linux. What is xz Compression? xz compression is a high-ratio data compression tool that is ... Read More
Introduction When working on a Linux terminal, you may sometimes need to keep several processes running at same time. However, if you close terminal or accidentally disconnect from a remote session, processes will terminate, and you may lose all your progress. This is where Linux screen command comes in handy. Screen is a powerful command-line utility that allows you to create and manage multiple terminal sessions within a single shell window or over SSH connections. It is a handy tool for managing long-running processes or multiple commands, even if you are not physically connected to server. In this article, we ... Read More
Introduction In Linux operating system, there are many commands that can be used to get system information, manage files, and perform various other tasks. One of most commonly used commands is "free" command. This command is used to display amount of free and used memory in system. In this article, we will discuss "free" command in detail, including its usage, options, and examples. What is Free Command? The "free" command is a tool that is used to display amount of free and used memory in Linux system. This command is very useful for monitoring system performance and identifying memory-related issues. ... Read More
XML is a commonly used format for exchanging data between systems. It is used extensively in web applications and other areas where data needs to be exchanged between different systems. However, XML can be difficult to read and understand when it is in its raw format. Pretty-printing XML is process of formatting XML in a more readable and understandable way. This article will discuss how to pretty-print XML from command line. What is Pretty-Printing? Pretty-printing is process of formatting data in a more human-readable and understandable way. In case of XML, pretty-printing involves adding whitespace and line breaks to XML ... Read More