2012年2月27日星期一

cp: omitting directory linux command error

if you are getting this error: cp: omitting directory
this is what you need to do: 

cp -r orginal_file new_file

-r 复制目录时,包括淅目录下所有的子目录和文件;-r选项不同于-R之处在于 尝试打开目的地文件前先删除已存在的目的地文件

By default, cp copies only the direct files in, and not subdirectories in the directory. The message cp: omitting directory 'directory' warns you that the mentioned directory is not copied.
To do so, specify the -r (or --recursive) option.

没有评论: