Linux System Management _ topic 02: Managing Files (1) _2.3 copy, cut, delete, and create files _cp_mv_rm

Source: Internet
Author: User

Usage: CP [options] ... [-t] source file destination file

OR: CP [options] ... Source file ... Directory

OR: CP [options] ...-t directory source files ...

Copy the source file to the destination file, or copy multiple source files to the destination directory.

? -F If the destination file cannot be opened remove it and try again

? -I ask before overwrite (invalidates the-n option)

? -L Create only hard-link files without copying files

? -N does not overwrite existing files (invalidates the-i option)

? -p Copy preserves file access, owner, filegroup, and timestamp

? -R recursively replicates all content within the directory and its subdirectories

? -S creates symbolic links only and does not copy files

? -U replicates only if the source file is newer than the destination file, or if the destination file does not exist

Usage: RM [options] ... File...

Delete (unlink) file.

? -F Force Delete. Ignore files that do not exist, do not prompt for confirmation

? -I need to confirm before deleting (default option)

? -R recursive removal of directories and their contents

The MV does not have the-r option and the MV can move directories directly.

Usage: MV [options] ... [-t] source file destination file

Or: MV [options] ... Source file ... Directory

Or: MV [options] ...-t directory source files ...

Rename the source file to the destination file, or move the source file to the specified directory.

? -F do not ask before overwriting

? -I ask before overwriting

? -N Do not overwrite existing files

? -U moves only when the source file is newer than the destination file or the destination file does not exist

If multiple in-I,-F,-n is specified, only the last one takes effect.

Linux System Management _ topic 02: Managing Files (1) _2.3 copy, cut, delete, and create files _cp_mv_rm

Related Article

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.