Linux Basics

30 / 107

Move Files & Directories

mv command is used to move or rename files and directories. It's syntax is same as cp, which is:

mv source destination
INSTRUCTIONS
  1. Create a file myfirstfile.txt.

    nano myfirstfile.txt
    
  2. Add the text a clever fox into the editor and press control+x, followed by y, and then enter to save the file and come out of the nano editor.

  3. Rename myfirstfile.txt to firstfile.txt.

    mv myfirstfile.txt firstfile.txt
    


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...