How to Move Files and Directories in CentOS?

Aug 1, 2020
Rakshitha
2 min read

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.

How To Move Files And Directories In Centos 1
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.
How To Move Files And Directories In Centos 2
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.
How To Move Files And Directories In Centos 3
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
How To Move Files And Directories In Centos 4
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.
How To Move Files And Directories In Centos 5
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.
How To Move Files And Directories In Centos 6
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?

Tags
CentOSfile managementVPS hosting

Need Expert Help?

Our team of cloud and IT experts is ready to help you solve your toughest challenges.