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

cp -a source dest
cp -r source/ dest/
posted @ 2019-08-19 19:40  imcati  阅读(199)  评论(0编辑  收藏  举报