sys mv

vb sys mv [OPTIONS] SOURCE... DEST

Description

Move (rename) SOURCE to DEST, or multiple SOURCE(s) to DEST directory.

Options

-f

Remove existing destination file

-n

Do not overwrite an existing file

-i

Prompt before overwrite (overrides -n)

-u

Move only when the source is newer

-v

Verbose

-t DIR

Move all SOURCE arguments into DIR

-T

Treat DEST as a normal file

Examples

  • Rename a file: rename the file alpha.txt to beta.txt

$ vb sys touch alpha.txt
$ vb sys mv alpha.txt beta.txt
$ vb sys ls
beta.txt
  • Move a file to a directory: Move the file beta.txt and gamma.txt to the directory dir1.

$ vb sys touch gamma.txt
$ vb sys mkdir dir1
$ vb sys mv beta.txt gamma.txt dir1 -v
beta.txt -> dir1/beta.txt
gamma.txt -> dir1/gamma.txt
  • Renam a directory: rename the directory dir1 to dir2

$ vb sys mv dir1 dir2 -v
dir1 -> dir2