linux - Unix Terminal error - "cp: the -R and -r options may not be specified together." -


i have bash script running on os-x unix above command:

cp -avr source destination

the result following error:

cp: -r , -r options may not specified together.

when remove a flag works ok without errors.

why , meaning of error?

thanks,

have @ man page cp:

-a, --archive same -dr --preserve=all

-r, -r, --recursive copy directories recursively

so specifying -a, say:

cp -drvr --preserve=all source destination 

you have both -r , -r, , since 2 same, warns you. fix that, remove -r:

cp -av source destination 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -