[BusyBox] /bin/cp and special files

Jim Treadway jim at stardot-tech.com
Thu Sep 12 19:13:03 UTC 2002


I just noticed that cp calls mknod if the source file is a device file or
socket, mkfifo if the source file is a FIFO, and symlink if the source
file is a symlink.

In other words, the destination file ends up being the same type as the 
source file instead of a new regular file.

I'm not sure what the "correct" behavior, but Busybox behaves differently
from my Red Hat boxes.

Just curious if there is a reason for this...
Jim





More information about the busybox mailing list