Found 1383 Articles for Open Source

Delete Multiple Files at Once in Bash

Pradeep Jhuriya
Updated on 12-Jan-2023 10:56:15

6K+ Views

Introduction Bash is a Unix shell and command language that is commonly used on Linux systems. It allows users to perform a variety of tasks, including deleting files. In this article, we will look at how to delete multiple files at once in Bash on a Linux system. We will cover the basic syntax for deleting multiple files, as well as some advanced techniques for deleting specific types of files or forcing the deletion of write-protected files. Using rm Command in Linux The rm command is used to delete files in Bash. To delete a single file, you can use ... Read More

Creating a Temporary File in Linux

Pradeep Jhuriya
Updated on 12-Jan-2023 10:54:21

6K+ Views

Introduction In Linux, it is often necessary to create temporary files for various purposes, such as storing intermediate data during processing or storing configuration information for a script. Temporary files are usually created in the /tmp directory, which is a standard location for storing temporary files on most Linux systems. Creating a Temporary File in Linux There are several ways to create a temporary file in Linux. One of the most common methods is to use the mktemp command, which creates a unique temporary file and prints the file name to the console.SyntaxTo create a temporary file using mktemp,  use the ... Read More

Uses of Exec Command in Linux

Pradeep Jhuriya
Updated on 19-Jul-2023 15:32:52

2K+ Views

Introduction The exec command is a built-in command in the Unix and Linux shell that allows a user to execute a command or a script in place of the current shell. This means that the exec command is used to replace the current shell process with a new process, which can be a command or a script. The exec command is useful in shell scripts when you want to execute a command or a script and then exit the current shell. Syntax of exec command −Example $ exec: exec [-cl] [-a name] [command [argument ...]] [redirection ...] Why should ... Read More

Write a Bash Script that Answers Interactive Prompts

Pradeep Jhuriya
Updated on 05-Apr-2023 11:32:48

4K+ Views

Introduction Interactive prompts are a common feature in many Linux command-line tools and utilities. These prompts allow the user to provide input or make a selection in order to proceed with a task. While interactive prompts can be useful in some situations, they can also be a nuisance when running scripts or automating tasks. In these cases, it can be helpful to know how to automatically answer interactive prompts. Handling Interactive Prompts There are several ways to automatically answer interactive prompts in Linux. One method is to use the expect command, which is a scripting language specifically designed for automating ... Read More

Jobs and Job Control in Linux

Pradeep Jhuriya
Updated on 05-Apr-2023 11:31:37

3K+ Views

Introduction In the Linux operating system, jobs refer to processes that are running in the background or foreground. Job control refers to the ability to manipulate these processes, including suspending, resuming, and terminating them. This can be useful for managing multiple tasks or for debugging problems with a process. Job control is made possible by the shell, which is a command-line interface that allows users to interact with the operating system. The most common shell in Linux is the Bourne Again Shell (BASH), but other shells such as the Z Shell (ZSH) and the Korn Shell (KSH) are also available. ... Read More

How to run Linux libraries on Docker on Windows?

Hemant Sharma
Updated on 11-Jan-2023 18:15:35

525 Views

Introduction Here in this article, we will learn about Linux libraries. What is the actual function of these libraries and what are the different types of libraries. Then we will understand to use these Linux libraries on the Windows OS with the help of various methods mentioned below. What are the Linux libraries? The Linux terminal works and follows only the commands. It is a “Text Only Console”, that responds to terminal commands. The definitions or the code for these commands or functions are stored in libraries. Types of Linux libraries The libraries can be divided based on the nature ... Read More

How to ignore files in Docker?

Hemant Sharma
Updated on 11-Jan-2023 18:14:29

6K+ Views

Introduction Here in this article, we will learn about the ignore file in docker. How to create a ignore file and how to use it with various ways to add files and folders to the ignore file. All the pre-requisite knowledge is mentioned in a stepwise manner. Do not directly jump to the implementation without knowing the requirement of the ignore files in the code industry. What are ignored files? Ignore files created in different systems like in the Git repository and the Dockerifle. These files help to exclude some files and directories from being used or copied in the ... Read More

How to fix the Docker build requires exactly one argument?

Hemant Sharma
Updated on 11-Jan-2023 18:12:59

5K+ Views

Introduction Docker build is a container image builder command. The command helps you to create your container image with some extra tweakable functionalities. While building the image using the “docker build” command beginners face a very common and simple problem of arguments. In this article, we have discussed various ways of encountering that error and how to resolve the error. Different ways of executing the build are also mentioned in the article. Creation of Dockerfile First of all, we will create a dockerfile. This dockerfile will help us to create a docker container image of the “apache-web-server”. The index page ... Read More

How to fix Ctrl+C inside a Docker container?

Hemant Sharma
Updated on 11-Jan-2023 18:11:13

3K+ Views

Introduction The real problem statement for this article is that developer is not able to use the interrupt signals while running or creating a Docker container. This is not a bug in Docker but a Linux feature. The complete problem and methods to recreate the problem are explained with the solution. Process in Linux Currently running or executing a program is a process. This process can be foreground or in the background. To see these processes, we have some terminal commands like ps and top. The ps shows active processes and the top shows the real-time update of the processes. ... Read More

How can I copy a file from one folder to another folder within a container in Docker?

Hemant Sharma
Updated on 11-Jan-2023 18:09:47

2K+ Views

Introduction In this article, we are going to discuss “How to transfer files as well as directories from the host operating system to the Docker container environment.” The need for all these commands is that many times developer has to provide various types of files to the Docker container, these files are configuration files, security and authentication files, application files, and many more. So, this is a very simple and important task that needs to be performed while creating or after the creation of the Docker container on the Docker daemon. Some commands are also going to be used while ... Read More

Advertisements