Search notes:

Shell command: mv

mv renames files or directories (which can be interpreted as moving them, hence the abbreviated name of the command).
mv [OPTION]…  [-T] SOURCE DEST
mv [OPTION]…   SOURCE… DIRECTORY
mv [OPTION]…   -t DIRECTORY SOURCE…

Options

--backup [=CONTROL] make a backup of each existing destination file. The default suffix, if not set with --suffix, is ~.
-b like --backup but does not accept an argument
-f --force do not prompt before overwriting
-i --interactive prompt before overwrite
-n --no-clobber do not overwrite an existing file
--strip-trailing-slashes remove any trailing slashes from each SOURCE argument
-S --suffix =SUFFIX override the usual backup suffix
-t --target-directory =DIRECTORY move all SOURCE arguments into DIRECTORY
-T --no-target-directory ­treat DEST as a normal file
-u --update move only when the SOURCE file is newer than the destination file or when the destination file is missing
-v --verbose explain what is being done
-Z --context set SELinux security context of destination file to default type
--help
--version Print version information

Rename files with special characters

find in combination with its -inum option allows to rename files with special character:
$ touch f\*1 f\*2 f\*3
$ ls -i1
468322 'f*1'
468374 'f*2'
468389 'f*3'
$ find . -inum 468374 -exec mv {} f-star-2 \;
$ ls -i1
468322 'f*1'
468389 'f*3'
468374 f-star-2

Moving dot files as well

mv src-dir/.[^.]* dest-dir

See also

cp, rename
Shell commands

Index