mv

Aliases: 
  • rename
  •  
    Parameters:
    Name Type Required Default Hint
    path string true The file or directory source to rename
    newPath string true The new name of the file or directory

    Command Usage

    Rename/move a file or directory to a new name and path

    Rename a file

    mv sample.html sample.htm 
    Move a file
    mv sample.html /test/sample.htm
    Rename a directory
    mv foo/ bar/ 
    Move a directory
    mv foo/ bar/foo/