Rename File

The mv (move) command is used to rename files To rename a file, “move” it from one filename to another.

Make File

touch untitled.txt

View Directory Contents Directory

ls -l
total 0
-rw-rw-r-- 1 chris chris 0 Jul 24 13:22 untitled.txt

Make File

mv untitled.txt august_records.txt

View Directory Contents Directory

ls -l
total 0
-rw-rw-r-- 1 chris chris 0 Jul 24 13:22 august_records.txt

mv Options:

  • -u Copy only files that don’t exist or are newer than files with the same names in the destination directory
  • -v Show verbose description of copy
  • -i Prompt if copy would override file