How to use Rsync to sync local and remote directories?

Rsync is a powerful tool for syncing files and directories between local and remote systems. It is a popular choice for backup and mirroring tasks, as it can efficiently transfer large amounts of data while preserving file permissions, ownership, and timestamps. In this article, we’ll explore how to use Rsync to sync local and remote directories, … Read more

View processes list in tree format in Linux

pstree is a command that shows the running processes as a tree. It is used as a more visual alternative to the ps command. The root of the tree is either init or the process with the given pid.  Syntax Example pstree Inspect a Process pstree Default Output

Sort the list of file names using ls command

To list only the file names using ls command we can pass -a option to it. Use this command: anand@hpfolio:/Minposts/Music$ ls -a Output: . .. Get_up_hustle_repeat.mp4 Instant Crush – Corbyn Kites.mp3 Orient – SefChol.mp3 ‘Icelandic Arpeggios – DivKid.mp3’ ‘minposts_playlists (1).png’ ‘Wind Riders – Asher Fulero.mp3’ You can sort the file names by passing | sort to the ls -a command. Use this command: … Read more

Concatenating strings in Bash

Concatenating strings in Bash is a common task that you may come across when working on shell scripts. This article will guide you through various methods of concatenating strings in Bash. Before we dive into the different ways to concatenate strings in Bash, let’s first understand what string concatenation means. String concatenation is a process … Read more

Copying directories using SCP

SCP, or Secure Copy, is a command-line utility used to copy files and directories between two remote hosts over a secure SSH connection. It is a simple and secure way to transfer files and directories over the internet. In this article, we’ll cover how to copy directories with SCP. Syntax for Copying The syntax for copying directories with SCP is … Read more