Build Complete Path in Linux by Concatenating Two Strings

Satish Kumar
Updated on 26-Dec-2022 11:25:24

800 Views

Overview We’ll look at some ways to create a complete Linux path by combining two paths into one. We’ll first look at some basic techniques for accomplishing this. Then, we'll talk about a generic approach that handles some of the special cases that appear when combining paths. Concatenating Strings to Build a Path We'll start by looking at an example where we want to concatenated strings to create a complete path. $ my_home_dir="/home/shubh/baeldung/" Here we assume that the current directory is where we want to clone the Git repo from. We then create a new folder called my_home_dir inside the ... Read More

What Happens to Open File Handle if File is Moved or Deleted

Satish Kumar
Updated on 26-Dec-2022 11:24:01

349 Views

Overview We’ll look at how the operating systems behave when we delete, move or replace files that have open handles. We’ll first briefly talk about files and inodes. After that, we’ll look at the different scenarios and see which one occurs in each case. Understanding Files and Inodes Files stored on a Linux file system use inode numbers to keep track of their contents. We usually list the contents of a directory by listing its file names (links) and then their corresponding inode numbers (hard links). We can use stat on a file and see which inode it refers to ... Read More

Solve Unary Operator Expected Errors

Satish Kumar
Updated on 26-Dec-2022 11:12:05

9K+ Views

Overview In this article, we will discuss how to solve the unary operator expected error in Linux. This is one of the most common errors that you may encounter while working with Linux. In this post, we will see how to fix it and what are the possible causes for this error. What Is Unary Operator Expected? The unary operator expects is a type of syntax error that occurs when an expression has only one operand. For example − int x 5; //error - unary operator expected The above code snippet shows an error because there is no binary operation ... Read More

Clear Linux Terminal Screen

Satish Kumar
Updated on 26-Dec-2022 11:06:58

2K+ Views

Overview The Linux terminal is an important tool for any user of the operating system, and it's often used to perform various tasks such as viewing log files or running commands. However, sometimes you may need to clear a screen on your computer so that you can see more than one thing at once. In this article we'll look at how to clear a screen in Linux. It’ll be helpful if we clear the command prompt window so that we can see more clearly what we're doing. We’ll discuss the different ways to accomplish this. Using the clear Command You ... Read More

Manipulating Images with ImageMagick Command

Satish Kumar
Updated on 26-Dec-2022 11:04:15

426 Views

Overview ImageMagick is an open source software suite for image manipulation. We can install it on our system using apt−get and then run commands through its command line interface (CLI). We’ll take a quick peek at some of the most popular methods for manipulating images with ImageMagick. Installation Let’s start by downloading ImageMagick, which we can install using our package manager (e.g., apt). We can also download the binary directly or compile it from the sources. After installing the software, let’s check whether we've successfully installed it by looking at its current status. $ magick -version Version: ImageMagick 7.0.8-13 Q16 ... Read More

Command Chaining: Inline or Already Running Process

Satish Kumar
Updated on 26-Dec-2022 10:58:16

411 Views

Overview You may sometimes want to run several commands sequentially in Linux. To accomplish this, you can use command chaining. For example, if you wanted to download a compressed archive, decompress it, and then remove the resulting archive from disk, you could type these three commands together. Here, we’ll look at some methods for serializing commands using Bash in Linux. Even if they're already running. Inline Command Chaining Bash has great flexibility and powerful features for the end−users. We can create long sequences of instructions to perform any number of tasks. ... Chained operations ... Read More

Add Time with Hours, Minutes, and Seconds Increments in Excel

Pradeep Kumar
Updated on 23-Dec-2022 15:13:00

26K+ Views

Maintaining the value of a particular item at every instance of time is a very crucial process if the prices of the item change very frequently. If we want to note the value of an item in particular intervals, then we need to create a list that contains the time with hours/minutes/seconds increment. For example, such a list is quite useful in case of stock prices because they change rapidly. Although we can’t note every value, we can note the value for all particular intervals, like for every 15 minutes, to analyse its change of price. How to Add Time ... Read More

Add Same Email Address to a List of Names in Excel

Pradeep Kumar
Updated on 23-Dec-2022 15:10:19

2K+ Views

An email address of a person, in most cases, is generally a combination of the first and last name, ending with the host details such as @gmail.com, @yahoo.com, etc. Suppose we have an Excel sheet with two columns containing the first and last names of employees, then we can easily append their email addresses in a third column, by combining the data values of the first two columns. Adding Email Address to a List of Names We can follow a simple process to add email addresses to a list of names. Basically, this process contains two parts, the first step ... Read More

Add Text at the Beginning or End of All Cells in Excel

Pradeep Kumar
Updated on 23-Dec-2022 15:08:16

18K+ Views

Let's suppose you need to add a particular text string in all the cells of an Excel sheet at the beginning or end of the existing data. It can be a tedious process if you decide to perform this such a task manually. In this tutorial, we will show you a simple method by which you can do it using a formula in Excel. We can add text in beginning or end using the same formula but the process is sequence of the work is different. Let us see the simple process to add text in bigging or end of ... Read More

Add Text in the Middle of Selected Cells in Excel

Pradeep Kumar
Updated on 23-Dec-2022 15:03:57

12K+ Views

Suppose you have an Excel sheet with a column of data and you need to add a string of text at a specific position in all the column data. In such cases, you don't have to type the entire data all over again to update the given column data. In this tutorial, we will demonstrate in a few simple steps how you can add the new data in between an existing set of data. Add Text in the Middle of Selected Cells in Excel Suppose we have an Excel sheet with a list of data that starts with the letter ... Read More

Advertisements