Medha Cloud Logo

How to Move Files and Directories in CentOS?

August 1, 2020

In this post we will see how to move Files and directories using terminal commands in CentOS. CentOS is a Community Enterprise operating system which mainly focuses on the server. It is a part of Linux Operating System Distribution, and it is free to use. First open the terminal.


Total Time Needed: 30 Minutes

Required Tools:

CentOS

Steps to move Files and Directories in CentOS

Step 1 : Move Files
To move files use the command mv source destination. For example, to move a file 1.txt to directory Documents. Type the command mv 1.txt Documents and press enter.

Step 2 : Move Directories
To move Directories use the command mv. For example, to copy dir5 to dirc type the command
mv dir5 dirc and press enter. If the directory is already present in dirc, the terminal will ask you for confirmation. Type y for yes and press enter.

Step 3 : Move Directories without Terminal Asking for Confirmation
To move Directories without terminal asking for confirmation using the command
mv –f source destination. For example, to move dir5 to dirc without asking for confirmation type, the command mv –f dir5 dirc and press enter

Step 4 : Move Multiple Files
To move multiple files, use the same command mv but add Multiple sources and a single destination. For example, to move 2.txt, 3.txt, 4.txt to downloads. Type the command mv 2.tct 3.txt 4.txt Downloads and press enter.

Step 5: Move Files and Check Summary
To moves files and check summary use the command mv –v source destination. For example, to move 2.txt, 3.txt, 4.txt to downloads and check summary type the command
mv –v 2.tct 3.txt 4.txt Downloads and press enter.

Conclusion:
You can easily move files and directories in CentOS following these steps. However, if you got any doubts and need help to manage you Linux infrastructure please contact Medha Hosting.
Read Here: How to Copy Files and Directories in CentOS?

Connect with Medha Cloud

Microsoft 365 Migration Form

I would like to send my contact information to MedhaCloud so that MedhaCloud can share additional information about products, services, thought leadership and invitations to flagship events with me by email. *

By submitting this form, I acknowledge that someone from MedhaCloud will contact me via email or phone to discuss my request.

Related Article

View All
chevron-down linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram