Satish Kumar has Published 1041 Articles

Move all files except one on Linux

Satish Kumar

Satish Kumar

Updated on 03-Jan-2023 10:52:58

3K+ Views

Introduction If you're working with Linux, there might be times when you'll want to copy several files at once and then remove some of them later. We're going to take a closer at several different methods for achieving such results. Renaming The Unwanted File You can rename the unwanted file ... Read More

Load Environment Variables in a Cron Job

Satish Kumar

Satish Kumar

Updated on 03-Jan-2023 10:51:02

5K+ Views

Overview When crontab runs a command, it doesn't read any environment variables from files like ~/.bashrc, ~/.bash_profile, etc. Because cron runs tasks from a non-interactive, non-login shell, it doesn't need an interactive user Some applications require environmental variables to function correctly. We’ll discuss different methods for loading environmental variables from ... Read More

How to use tmux on Linux?

Satish Kumar

Satish Kumar

Updated on 03-Jan-2023 10:48:43

337 Views

Overview Tmux is a terminal multiplexing utility for Unix systems. It provides an interface between several programs running simultaneously on one computer. Tmux allows us to detach from any terminal sessions without killing them. We can then reattached to any of the terminal sessions later on. We’ll learn the tmux ... Read More

Exclude directories while using grep command?

Satish Kumar

Satish Kumar

Updated on 26-Dec-2022 12:07:25

3K+ Views

Overview We often run a grep command to look for specific strings of text within files. The grep command provides some additional functionality that makes the search even better. A feature that allows you to exclude certain directories from recurrence. This is useful when searching through large amounts of data. ... Read More

Redirect output of process to a file and streams?

Satish Kumar

Satish Kumar

Updated on 26-Dec-2022 12:05:35

815 Views

Overview We'll look at some ways to redirect the output of processes to files and standard streams such as STDOut and STDERR simultaneously. The tee Command Tee is one of the most common Linux command line tools that we can use to redirect a process' output. It's also known as ... Read More

Remove symbolic links file in Linux?

Satish Kumar

Satish Kumar

Updated on 26-Dec-2022 12:00:46

14K+ Views

Overview Symbolic links allow us to access files more easily, even if they're located in a different location. In this tutorial we'll learn how to remove symbolic links from our system and replace them with the original file. The Problem If we have an aDir folder and an aFile.text file ... Read More

The “Argument list too long” Error in Linux Commands

Satish Kumar

Satish Kumar

Updated on 26-Dec-2022 11:51:19

2K+ Views

Overview In this article, we will discuss the error message that is displayed when you try to execute a command on your Linux system and it says “argument list too long”. This error can be caused by many reasons. In this post, I am going to explain what causes this ... Read More

Compare two directories in Linux?

Satish Kumar

Satish Kumar

Updated on 26-Dec-2022 11:48:09

2K+ Views

Introduction It's quite common for people to compare two directories. Many different factors make us want to find out whether there really is a difference between two things. For example, we normally want to figure out what's different from a previous situation when something goes wrong. We’ll learn how we ... Read More

Display specific columns of a file in Linux?

Satish Kumar

Satish Kumar

Updated on 26-Dec-2022 11:42:26

4K+ Views

Overview We often perform various file operations on our Linux systems. One of the most common operations is to display certain columns from a text document. Here, we’ll cover the different methods for achieving this. Display Single Column Let's create a new folder for our example. The input.txt files contain ... Read More

Kill a process running on a specific port?

Satish Kumar

Satish Kumar

Updated on 26-Dec-2022 11:41:07

5K+ Views

Overview It’s common when working with Linux to want to stop a process from using a specific TCP/IP protocol. For example, you might be running an application that listens for HTTP requests and you don’t want it to listen on port 80 (the standard HTTP port). You could use the ... Read More

Advertisements