mv

Move files or directories.

Signature

> mv (source) (destination) --verbose --interactive

Parameters

  • source: the location to move files/directories from
  • destination: the location to move files/directories to
  • --verbose: make mv to be verbose, showing files been moved.
  • --interactive: ask user to confirm action

Examples

Rename a file

> mv before.txt after.txt

Move a file into a directory

> mv test.txt my/subdirectory

Move many files into a directory

> mv *.txt my/subdirectory