Satish Kumar has Published 1041 Articles

How to check Syntax of a Bash Script without running it in Linux?

Satish Kumar

Satish Kumar

Updated on 23-Dec-2022 11:17:11

809 Views

Overview Here, we’ll see how we can validate the syntactical correctness of a bash script without actually executing it. We’re going to examine some of the Bash and external tools that can be used for that task. Configure Let’s first write a simple script that we’ll be using in almost ... Read More

Find last Directory or file from a given path

Satish Kumar

Satish Kumar

Updated on 23-Dec-2022 11:14:58

541 Views

Overview We often use shell scripts or work with Linux commands when handling paths. Extracting the last part of a given file name is a fairly common task. For example, if we're trying to access /tmp/dir/target, then we want to be able to access target as a file name. Yes, ... Read More

Copying SSH Keys to different Linux Machine

Satish Kumar

Satish Kumar

Updated on 23-Dec-2022 11:03:39

363 Views

Overview When working with SSH keys, it is important to keep them safe. We can protect ourselves against accidental deletion by storing them in an encrypted file. We can also make sure they aren’t compromised if someone tries to steal them by keeping them offline. For example, we could store ... Read More

Most Common Flags Used in /proc/cpuinfo

Satish Kumar

Satish Kumar

Updated on 23-Dec-2022 10:38:52

797 Views

Overview We’ll go through some of the features available on the CPU installed on our computer’s motherboard. We’ll briefly look at the concept of virtual file systems before we dive into the details of the topic. Afterward, we’ll discuss the flags obtained from the /proc/cpuinfo virtual directory for different CPU ... Read More

How to read a Specific Line From a File in Linux?

Satish Kumar

Satish Kumar

Updated on 01-Dec-2022 09:14:25

13K+ Views

When working with the Linux shell, reading text files is often an important operation. Sometimes, we may be interested in reading a specific line from a file. We’ll take a look at different ways to get a specific piece of text out of a file. The actual Problem Let’s take ... Read More

How to find total physical memory (RAM) size on Linux?

Satish Kumar

Satish Kumar

Updated on 01-Dec-2022 09:03:16

2K+ Views

We can often get away without checking for total memory usage on servers running Linux. However, sometimes we may want to know the total memory available on our servers. Luckily, there are various ways to accomplish this task. In this tutorial, I’ll show you some of them. Using free Command ... Read More

How to restart a NoSQL Database service like MongoDB?

Satish Kumar

Satish Kumar

Updated on 01-Dec-2022 08:57:14

867 Views

If we're going to use a NoSQL DB for our app, then we want something fast and easy to use. We learn that "NoSQL" doesn't necessarily imply "no maintenance". We think about using managed hosting services like MongoDB's Atlas or Amazon's DynamoDB, but we choose to host it ourselves, whether ... Read More

Difference Between sh and Bash in Linux?

Satish Kumar

Satish Kumar

Updated on 01-Dec-2022 08:51:52

14K+ Views

Bash is a BourNeSh (Bourne Again ShEl) which is an improved variant oF thE origiNal Bourne shEll.It is used to run programs in the Bash programming language, and is often referred to as "the default shell" for Linux distributions. Sh is a simple commandinterpreter for the UNIX System V Release ... Read More

How to replace string in a large one line, text file in Linux?

Satish Kumar

Satish Kumar

Updated on 01-Dec-2022 08:48:10

743 Views

Some software reads an entire input file into memory before processing it. If the input file contains a very long string, the software may crash if there isn't enough memory to hold the entire string. We’ll look at ways to change a single character in a very large one-liner file ... Read More

How to download a Tarball from GitHub on Linux?

Satish Kumar

Satish Kumar

Updated on 01-Dec-2022 08:44:37

2K+ Views

Github is an online source code repository and hosting service for open-source projects, which provides the ability to host, version control, review, fork, and submit changes to any project hosted there. The following steps will help you download a tarball of your choice from github.com − By using git ... Read More

Advertisements