cp -r not working correctly???

This sounds stupid, but I am having a problem with QNX4.25 cp command. I
have been a Linux/Unix user for years, but I can not figure this one
out.

I have a directory structure I wish to copy from an nfs mount (Solaris
system) to my local drive. Say it is /remote and I want to copy it to
/local. I use the -Rc (or -rc) options, recurse and create dirs.
When I get finished the destination directory is screwed up. It contains
all of the files, but it did not create the FIRST LEVEL directories!!!
Like I have:
/remote/src/.c
/remote/obj/
.o

I do a: cp -rcv /remote/* /local/ ( or /local/. )
My resulting /local is:
/local/*.c & *.o
no src or obj dirctories are created. But, their files are under /local.

If there are sub-dirs off of src/ or obj/ they are created off of /local
and their files placed in them. i.e.
/remote/src/backup/.c
ends up
/local/backup/
.c

cp is not creating the first level directories in the target.

Jeff Pierce
piercej@preferred.com
http://pages.preferred.com/~piercej

Jeff Pierce <piercej@preferred.com> wrote:
: cp is not creating the first level directories in the target.

The QNX 4 recursive copy is different from the UNIX one (as you have
discovered). Check out the “-M unix” option in the docs for cp.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems Ltd.

Steve Reid <stever@qnx.com> wrote:
: Jeff Pierce <piercej@preferred.com> wrote:
: : cp is not creating the first level directories in the target.

: The QNX 4 recursive copy is different from the UNIX one (as you have
: discovered). Check out the “-M unix” option in the docs for cp.

By the way, under QNX Neutrino, the UNIX mode is the default, and you have
to specify the QNX 4 behaviour explicitly if you want it.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems Ltd.