Errors using cp on files in image system

I am having a problem using cp to copy a data file from a location in the image file system to /tmp, which is linked to /dev/shmem. When copying the file, I get the
warning message:

cp: Can’t change file mode (data copied) (/tmp//data83,100664): Function not implemented

The file is copied, and has its original size, but any attempt to access the file is reported as ‘not a regular file’.

The original file, per ‘ls -l’
-rw-rw-r-- 1 100 100 16384 Mar 06 2002 data83

The copied file…
nrwxrwxrwx 2 0 0 16384 Mar 06 2002 data83

Any insight into the above errors?

/dev/shmem is not a real filesystem. It’s only pretending to be so as to
give a nice interface to shared memory. That’s why things appear as special
files and you’ll find some utilities complaining about working with things
there. That’s also why utils like ‘less’ have a -f flag to force them to
work with non-regular files if you know they’re text. I recently put a -f
flag in our version of vi for the same reason - it was refusing to open
files in /dev/shmem. You’ll notice a few things there like perms and links
that don’t work but in order to make them work, we’d have to put a lot more
code into our nice, skinny, lightweight procnto and you wouldn’t want that
now would you? :wink:

Kris

<mfeller@mgako.com> wrote in message news:1103_1015598148@inn.qnx.com

I am having a problem using cp to copy a data file from a location in the
image file system to /tmp, which is linked to /dev/shmem. When copying the

file, I get the

warning message:

cp: Can’t change file mode (data copied) (/tmp//data83,100664): Function
not implemented

The file is copied, and has its original size, but any attempt to access
the file is reported as ‘not a regular file’.

The original file, per ‘ls -l’
-rw-rw-r-- 1 100 100 16384 Mar 06 2002 data83

The copied file…
nrwxrwxrwx 2 0 0 16384 Mar 06 2002 data83

Any insight into the above errors?
\

So is there a way to work with cp so that I do not get this error message every time I try to copy a file to /tmp->/dev/shmem?

Mark

On Fri, 8 Mar 2002 10:32:41 -0500, “Kris Warkentin” <kewarken@qnx.com> wrote:

/dev/shmem is not a real filesystem. It’s only pretending to be so as to
give a nice interface to shared memory. That’s why things appear as special
files and you’ll find some utilities complaining about working with things
there. That’s also why utils like ‘less’ have a -f flag to force them to
work with non-regular files if you know they’re text. I recently put a -f
flag in our version of vi for the same reason - it was refusing to open
files in /dev/shmem. You’ll notice a few things there like perms and links
that don’t work but in order to make them work, we’d have to put a lot more
code into our nice, skinny, lightweight procnto and you wouldn’t want that
now would you? > :wink:

Kris

mfeller@mgako.com> > wrote in message news:> 1103_1015598148@inn.qnx.com> …
I am having a problem using cp to copy a data file from a location in the
image file system to /tmp, which is linked to /dev/shmem. When copying the
file, I get the
warning message:

cp: Can’t change file mode (data copied) (/tmp//data83,100664): Function
not implemented

The file is copied, and has its original size, but any attempt to access
the file is reported as ‘not a regular file’.

The original file, per ‘ls -l’
-rw-rw-r-- 1 100 100 16384 Mar 06 2002 data83

The copied file…
nrwxrwxrwx 2 0 0 16384 Mar 06 2002 data83

Any insight into the above errors?


\

mjf77@lycos.com wrote:

So is there a way to work with cp so that I do not get this error message
every time I try to copy a file to /tmp->/dev/shmem?

cp -t