Busybox Recursive Non-Overwriting File Copy

flywire

New Member
Joined
Sep 8, 2018
Messages
3
Reaction score
0
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"
 


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
 

Members online


Top