cp 命令
cp - copy files and directories
用法:
cp [OPTION] source dest
DESCRIPTION
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
-a 拷贝文件及属性
-i, --interactive
prompt before overwrite (overrides a previous -n option)
-l, --link
hard link files instead of copying
-n, --no-clobber
do not overwrite an existing file (overrides a previous -i option)
-R, -r, --recursive
copy directories recursively
-s, --symbolic-link
make symbolic links instead of copying
-u, --update
copy 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
示例:
cp source dest
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190819225531507-1933715794.png)
cp -a source dest
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190819225713726-144850646.png)
cp -r source/ dest/
![](https://img2018.cnblogs.com/blog/1279026/201908/1279026-20190819230459760-56923049.png)
赠人玫瑰,手有余香,如果我的文章有幸能够帮到你,麻烦帮忙点下右下角的推荐,谢谢!
作者: imcati
出处: https://www.cnblogs.com/imcati/>
本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出, 原文链接