1

I'm porting a script from ubuntu to alpine linux 3.4 (docker image). I can't seem to find a way to do "cp --backup=numbered" in alpine. Is there any way to install a more complete "cp"? Thanks

2 Answers 2

4

I think I found the answer to this one... apk add --upgrade coreutils It seems that --backup is an option of GNU coreutils, which is not installed by default in the alpine linux 3.4 docker image. Adding it via the command above sorted it.

2
  • Would this partially defeat the purpose of alpine? Would this upgrade every linux utility? ping, nc, find, grep etc?
    – Ray Foss
    Jul 11, 2018 at 14:03
  • @ray Yes, it would partially defeat the purpose of alpine, but none of those specific tools are part of coreutils
    – Auspex
    Jun 4, 2019 at 13:34
1

Alpine Linux uses busybox, which has a built-in cp command, as well as other commands. For GNU commands, they can be easily installed via apk package manager.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .