Busybox Recursive Non-Overwriting File Copy

flywire

New Member
Credits
15
How do I do a recursive file copy to copy any missing files without overwriting? (Busybox cp has no -n option and no rsync.)

The line below would be fine if the overwrite n response was automatically entered. Also need to exclude a couple of specific directories.

#!/bin/sh
target="/www/docroot/"
source="/rom$target"
cp -ir "$source"* "$target"
 


wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
7,736
Hi @flywire and welcome to linux.org :)

Just a holding Post as this is beyond my paygrade.

We have some people capable with scripting &c and subject to their weekend commitments hopefully someone will be along soon.

Cheers

Chris Turner
wizardfromoz
 


Staff online

Members online


Top