Name

mv — stdin  stdout  - file  -- opt  --help  --version

Synopsis

mv [options] source target

The mv (move) command can rename a file or directory:

mv file1 file2

or move files and directories into a destination directory:

mv file1 file2 dir3 dir4 destination_directory

Useful options

-i

Interactive mode. Ask before overwriting destination files.

-f

Force the move. If a destination file exists, overwrite it unconditionally.

Get Macintosh Terminal Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.