Files
freeCodeCamp/guide/english/bash/bash-mv/index.md
Benabadji Mohammed Salim 06fbd4c156 split example usage (#20164)
2018-10-27 20:07:39 -07:00

616 B

title
title
Bash mv

Bash command: mv

Rename file.

mv <source> <target>

Moves files and folders.

mv <source> <path + filename>

The first argument is the file you want to move, and the second is the location to move it to. It can also be used to rename a file, by inputting 2 file names as parameters, like so: mv originalFilename.txt newFilename.txt

Commonly used options:

  • -f to force move them and overwrite files without checking with the user.
  • -i to prompt confirmation before overwriting files.

More Information: