Copy one directory to another directory , if target directory already exist? how to rename it using shell scripting? -


i new shell scripting copy 1 directory directory, if target directory exist? how rename target directory ? example have directory (red) need copy directory (org), target directory (org) have red directory @ time need rename it.

using shell scripting?

copy directory if exists , recursively:

cp -rf source target 

rename directory

mv oldname newname 

Comments