Book Image

Practical Linux Security Cookbook

By : Michael A Lindner, Tajinder Kalsi
Book Image

Practical Linux Security Cookbook

By: Michael A Lindner, Tajinder Kalsi

Overview of this book

With the growing popularity of Linux, more and more administrators have started moving to the system to create networks or servers for any task. This also makes Linux the first choice for any attacker now. Due to the lack of information about security-related attacks, administrators now face issues in dealing with these attackers as quickly as possible. Learning about the different types of Linux security will help create a more secure Linux system. Whether you are new to Linux administration or experienced, this book will provide you with the skills to make systems more secure. With lots of step-by-step recipes, the book starts by introducing you to various threats to Linux systems. You then get to walk through customizing the Linux kernel and securing local files. Next you will move on to manage user authentication locally and remotely and also mitigate network attacks. Finally, you will learn to patch bash vulnerability and monitor system logs for security. With several screenshots in each example, the book will supply a great learning experience and help you create more secure Linux systems.
Table of Contents (17 chapters)
Practical Linux Security Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

File handling using the mv command (moving and renaming)


The mv or move command is used when we wish to move files from one directory to another, and we don't want to create duplicates while doing this (something that happens when using the cp command).

Getting ready…

Since mv is a built-in command of Linux, we don't have to configure anything else to understand how it works.

How it works…

On every Linux system, this command is installed by default. Let's take a look at how to use the mv command by taking different kinds of examples:

  1. To move the testfile1.txt file from the current directory to any other directory, such as home/practical/example, the command is as follows:

    mv testfile1.txt /home/practical/example
    

    The preceding command will work only when the location of the source file is different from the destination.

    When we move the file using the preceding command, the file will get deleted from the previous location:

  2. To move multiple files using a single command, we can use this command:

    mv...