Linux Command details (2)-mv
File Location:
Mv:/bin/mv/usr/share/man/man1/mv.1.gz
Name:
Mv-move (rename) files
Usage:
Mv [OPTION]... [-T] SOURCE DEST
Mv [OPTION]... SOURCE... DIRECTORY
Mv [OPTION]...-t directory source...
Description:
Rename the SOURCE file to DEST, or move one or more SOURCE files to the DIRECTORY folder.
-- Backup [= CONTROL]
Back up each existing file in the target folder
Unless -- suffix or SIMPLE_BACKUP_SUFFIX is set, the default backup file suffix is '~ '.
You can specify the CONTROL variable to set the backup method, or set the environment variable VERSION_CONTROL to the following values:
None, off
Never create a backup (whether or not -- backup is specified)
Numbered, t
Create a backup with a digital Index
Existing, nil
If a backup with a digital index already exists, use a digital index backup. Otherwise, use a normal backup.
Simple, never
Always use normal backup
-B
-- Backup versions without Parameters
-F, -- force
Confirmation is not required when overwriting existing files.
-I, -- interactive
Confirm when overwriting existing files
-N, -- no-clobber
Do not overwrite existing files
If-I,-f,-n are specified at the same time, the last one takes effect.
-- Strip-trailing-slashes
Remove/from the end of each SOURCE file (involving copying folders and link files)
Reference: http://gnu-coreutils.7620.n7.nabble.com/mv-trailing-slash-warning-td975.html
-S, -- suffix = SUFFIX
Change the default backup file suffix
-T, -- target-directory = DIRECTORY
Move all SOURCE files to the DIRECTORY
-T, -- no-target-directory
DEST is treated as a common file. If DEST is a folder, the SOURCE file is not moved to the folder.
-U, -- update
Only when the SOURCE file is newer than the target file or the target file is lost
-V, -- verbose
Output Execution Process
-- Help
Show Help Information
-- Version
Show version information