Linux Command details (2)-mv

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.