Skip to main content
Sagar Sharma

Sagar Sharma

157 posts published

A software engineer who loves to tinker with hardware till it gets crashed. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.

Save curl output to file
Tips

How to Save cURL Output to a File?

Learn to save the curl command output to a file for later usage in this quick tutorial.

ยท Sagar Sharma

Get directory location in Bash
Bash Tips

Get Script Directory Location in Bash

Here are a couple of ways of getting the directory location of your bash script inside the bash script.

ยท Sagar Sharma

Increment decrement counters in Bash
Bash Tips

Various Ways to Increment or Decrement Counters in Bash

Working with loops in bash? Here are various ways of incrementing and decrementing counters.

ยท Sagar Sharma

Explaining the meaning of <, << and <<< symbols in Linux
Explain

What do <, << and <<< mean in Linux?

The <, << and <<< look similar to redirection indicators but they have a different purpose. Learn about them.

ยท Sagar Sharma

bc command
Commands

bc Command in Linux

The bc command is used for precision calculation. You are more likely to use it for floating point operations in bash scripts.

ยท Sagar Sharma

While loop in bash
Bash Tips

Use While Loop in Bash

Learn to use the while loop in bash with practical examples in this tutorial.

ยท Sagar Sharma

Find directory in Linux
Tips

Find a Directory in Linux

Here are various ways you can use the find command to look for directories with specific parameters.

ยท Sagar Sharma

Until loop in bash
Bash Tips

Using Until Loop in Bash

While for maybe the most popular bash loop, wait until you discover until. Pun intended :)

ยท Sagar Sharma

lshw Linux command gives you hardware details of your system
Commands

lshw Command in Linux: Get Hardware Details

The lshw command lists the hardware details of your Linux system. You can categorize it to get details on different kinds of hardware.

ยท Sagar Sharma

Save Linux command output to text file
Tips

Redirect Linux Command Output to File

Want to analyze the effect of Linux command for later? Here's how you can save Linux command output to a file.

ยท Sagar Sharma

Shell built-in commands list
Commands

Shell Built-in Commands

In Linux, there are shell built-in commands which you are already using but never paid attention to. Learn more about them in this tutorial.

ยท Sagar Sharma

Clear PIP cache
Tips

Clearing Pip Cache

Cleaning Pip cache helps you in troubleshooting and getting fresh Python packages.

ยท Sagar Sharma

Read file line by line in Bash
Bash Tips

Read File Line by Line in Bash

Here are a couple of ways for reading file line by line in the Bash shell.

ยท Sagar Sharma

Run Multiple Linux Commands
Tips

Run Multiple Linux Commands in One Go

In this quick, beginner's tip, learn to run multiple Linux commands one after another in a single command.

ยท Sagar Sharma

For Loop with Array in Bash
Bash Tips

Use For Loop With Array in Bash

In this Bash scripting example, learn how to use for loop with arrays.

ยท Sagar Sharma

Check if variable is empty in Bash
Bash Tips

Check if Variable is Empty in Bash

Learn various ways to check if a variable is empty in bash.

ยท Sagar Sharma

Systemctl check service Status
Quick Tip

Use Systemctl Status Command to Check Service Status

Learn how to check and understand the status of a systemd service using the systemctl command.

ยท Sagar Sharma

Bash array length
Bash Tips

Get Array Length in Bash

In this quick bash tip, learn about calculating the array length.

ยท Sagar Sharma

System calls in Linux
Explain

System Calls in Linux

System calls are an integral part of the Linux architecture. Learn about the most common types of system calls in Linux.

ยท Sagar Sharma

Suspend process in Linux
Process Handling

Suspend and Resume Processes in Linux

Learn how to suspend a running process in the Linux command line. Also learn how to resume a stopped process.

ยท Sagar Sharma

Arrays in bash
Bash Tips

Appending to Arrays in Bash

In this quick Bash tip, you'll learn about appending to an existing array in bash.

ยท Sagar Sharma

Using exec command in Bash shell scripts
Bash Tips

Using exec Command in Bash Shell Scripts

The exec command in shell scripts is super useful for logging, reading from files and running commands by replacing the current process.

ยท Sagar Sharma

tmp directory in Linux
Tips

Everything Essential About the tmp Directory in Linux

Learn some crucial things about the /tmp directory. You'll also learn how it is different from the /var/tmp directory.

ยท Sagar Sharma

$0 in Bash
Bash Tips

What is $0 in a Bash Script?

Get familiar with the special variable $0 in Bash and learn its usage.

ยท Sagar Sharma

Force Linux User to Change Password at Next Login
Quick Tip

Force Linux User to Change Password at Next Login

Think the passwords need to be changed by a certain user? Here's how to force a Linux user to change the password at the next login.

ยท Sagar Sharma

chattr command in Linux
File Properties Commands

chattr Command Examples

With chattr command, you can make a file 'undeletable' even by root. Here are some common usage of the chattr command in Linux.

ยท Sagar Sharma

Bash special variables
Bash Tips

Special Variables in Bash Shell Scripting

The bash shell has some special variables that have specific usages and purposes. Learn more about them here.

ยท Sagar Sharma

Mount point does not exist error in Linux
Troubleshooting

Fixing Mount Point Does Not Exist Error in Linux

Learn how to troubleshoot and fix the 'mount point does not exist' error in Linux with our step-by-step guide.

ยท Sagar Sharma

Umount target is busy in Linux
Troubleshooting

Fixing 'Umount Target is Busy' Error in Linux

A not-so-uncommon error while using umount command is 'target is busy'. Learn what you can do to get rid of this error.

ยท Sagar Sharma

envsubst Command
Commands

How to Replace Environment Variables Using the envsubst Command

Learn how to replace environment variables using the envsubst command. This guide will show you how with examples and tips.

ยท Sagar Sharma