Question: How to Move Files in Terminal Linux?
Contents

mv command is used to move files and directories.

  • mv command syntax. $ mv [options] source dest.
  • mv command options. mv command main options: option. description.
  • mv command examples. Move main.c def.h files to /home/usr/rapid/ directory: $ mv main.c def.h /home/usr/rapid/
  • See also. cd command. cp command.

How do you move files in terminal?

So, for example, to move a file from one folder to another on your Mac, you’d use the move command “mv” and then type the location of the file you want to move, including the file name and the location where you want to move it to. Type cd ~/Documentsthen and press Return to navigate to your Home folder.

How do I move a file from one directory to another in Linux?

To move a directory using the mv command pass the name of the directory to move followed by the destination.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest