Found 1437 Articles for Linux

Skip Hidden Files and Directories During Recursive Copy

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

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

How to Show the wget Progress Bar Only in Linux?

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

1K+ Views

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

How to Set Wget Connection Timeout in Linux?

Kunal Verma
Updated on 23-Mar-2023 18:22:38

1K+ Views

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

Fixing the "Too many open files" Error in Linux

Kunal Verma
Updated on 23-Mar-2023 18:21:55

26K+ Views

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

Find the Process That is Using a File in Linux

Kunal Verma
Updated on 23-Mar-2023 18:20:05

19K+ Views

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

Escaping Characters in Bash on Linux

Kunal Verma
Updated on 04-Apr-2023 10:47:31

169 Views

Abstract Characters are used in source code, command lines, and the majority of computer interaction. The majority of characters, on the other hand, are not represented by keys on a standard keyboard, and many are not even readable. Another category of characters is complicated control characters. We'll talk about character escape in Bash in this tutorial. We'll start off by briefly outlining how computers represent characters. First, we examine the various string types in Bash. The character escape in only Bash is then thoroughly described. Note − Linux commands are case-sensitive. Strings in Bash Since a key does not represent ... Read More

Bash Special Variables in Linux

Satish Kumar
Updated on 14-Jul-2023 17:47:17

162 Views

Introduction Bash (Bourne Again SHell) is default shell for most Linux systems. It is a command language interpreter that executes commands from standard input, file or command-line arguments. Bash shell provides a set of special variables that contain various system-related and user-related information. These special variables are used to manipulate and access data efficiently. In this article, we will explore bash special variables in Linux with examples. What are Bash Special Variables? Bash special variables are predefined variables that are used to store system and user-related information. They start with "$" symbol and are used in bash scripts to perform ... Read More

Using xz Compression in Linux

Satish Kumar
Updated on 23-Mar-2023 17:43:26

4K+ Views

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

Guide to Linux screen Command

Satish Kumar
Updated on 23-Mar-2023 17:42:33

328 Views

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

Advertisements