Linux Basics for Big Data

20 / 87
Move Files & Directories

mv command is used to move or rename files and directories.

Question- Rename a file

  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" to save

  3. rename myfirstfile.txt to firstfile.txt

    mv myfirstfile.txt firstfile.txt