Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

day 7 - linux 命令 : cp #76

Open
hoperyy opened this issue Oct 12, 2017 · 0 comments
Open

day 7 - linux 命令 : cp #76

hoperyy opened this issue Oct 12, 2017 · 0 comments

Comments

@hoperyy
Copy link
Owner

hoperyy commented Oct 12, 2017

day 7 - linux 命令 : cp

cp 命令用来复制文件或目录

语法

cp [选项] 源文件或目录 目标文件或目录

选项

  • -f

    强制

  • -i

    如果目标文件已经存在时,就会询问是否覆盖

实例

  • 复制文件到目录

    cp a.js folder

    无论在目录中是否存在该文件,均会覆盖

  • 交互式复制文件到目录

    cp -i a.js folder

  • 复制目录到目录

    cp folder0 folder

    结果是 folder 中多了 folder0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant