mv

Move or rename files

Usage

      mv SOURCE DESTINATION
    

Moves or renames SOURCE to DESTINATION

Common Flags

-i, --interactive Prompt before overwrite-n, --no-clobber Do not overwrite an existing file-v, --verbose Explain what is being done

Examples

Rename a file

      mv file1.txt file2.txt
    

Renames file1.txt to file2.txt

Move a file

      mv file1.txt Documents/
    

Moves file1.txt into the Documents directory

Move multiple files

      mv file1.txt file2.txt Documents/
    

Moves file1.txt and file2.txt into Documents

Move files following a pattern

      mv *.txt Documents/
    

Moves all .txt files into Documents