Rename/Replace white space in files in entire directory recursively

Rename/Replace white space in files in entire directory recursively

The purpose of this tutorial is to show various methods on how to rename or replace white space in multiple files. Some tools on a Linux system may not work properly with files that contain white spaces, which would give some users motivation to replace the white space with underscores, for example. Manipulating files without white space is much easier, as you do not have to worry about escaping the file name each time.

Read more

Backup, restore, destroy, and install MBR on Linux

Linux Backup Restore Destroy and Install MBR – Master Boot Record

Master Boot Record (MBR) is a type of boot loader that tells a system how the partitions on a disk are organized. Although MBR has been superseded by GUID Partition Table in recent years, MBR is still very prevalent across many systems. Without a boot loader, your system will have a hard time booting into your operating system – whichever Linux distro that may be. As such, it can be useful to learn how to back up and restore the MBR on Linux.

In this guide, we’ll be going over the commands used to backup, restore, destroy, and install MBR to a disk on Linux. Check out the examples below to learn how.

In this tutorial you will learn:

  • How to manage MBR on Linux

Read more

nohup command in Linux with examples

Nohup command in Linux with Examples

The nohup command in Linux is used to tell a process to ignore any SIGHUP (hangup) signals that it receives. The SIGHUP signal is sent to a background job whenever the current terminal is closed. Thus, we can have a job in the background, close the terminal, and still see it running in the background.

Read more

Replacing all tab characters with spaces on Linux

Replace all TAB characters with spaces

If you have a lot of tab characters inside a text document or program file, they can be annoying because of how they’re represented differently in various text editors. For example, when you send your code to someone else, is it going to display the same way on their screen as it did on yours? Tabs are a bit unpredictable in this respect, and spaces are a much safer bet.

In this guide, we’ll show how to replace all the tab characters inside a file with spaces on Linux. We can use various Linux commands to do the job for us, which we’ll go over below. Depending on your situation and the file in question, some commands may be more suitable than others.

In this tutorial you will learn:

  • How to replace tab characters with spaces

Read more

Backing up a MySQL database on Linux

Linux commands to back up and restore MySQL database

It’s always a good idea to take frequent backups of your MySQL or MariaDB databases. They can potentially contain thousands of lines of irreplaceable data. Many users may be confused on how to back up their databases at first, as the process differs quite a bit from backing up ordinary files. The process of restoring a backup must also be known, as there’s no point in having a backup if the user cannot reliably restore it.

In this guide, we’ll go over various command line examples to back up and restore MySQL or MariaDB databases on a Linux system. You can then use these commands to make regular backups of your databases, or even add them to a Bash script that can do most of the work for you. Another option is to configure cron to make regularly scheduled backups of your databases.

In this tutorial you will learn:

  • How to back up MySQL or MariaDB database (one or multiple)
  • How to restore a MySQL or MariaDB database backup

Read more