Ekanayake, Sumith wrote:
Hello,

We have a strange issue using "cp" command with -p option on Redhat
Linux 3 kernel 2.4.21-47.ELsmp. I get the following error message...

When you use without an option, no problems
[EMAIL PROTECTED] ~]$ touch a
[EMAIL PROTECTED] ~]$ cp a b
[EMAIL PROTECTED] ~]$ ls -ld b
-rw-r--r--    1 sekanaya cadd            0 Mar 16  2007 b

When you use with -p option
[EMAIL PROTECTED] ~]$ touch c
[EMAIL PROTECTED] ~]$ cp -p c d
cp: preserving permissions for `d': Invalid argument

eventhough I get this above error message, it copies the file.
[EMAIL PROTECTED] ~]$ ls -ld d
-rw-r--r--    1 sekanaya cadd            0 Mar 16  2007 d

I do not get this error message Redhat 4.... Any idea ???

Given that you just said "we have an issue with cp on <older OS> that does not happen on <newer OS>", have you considered that maybe there is a bug that has already been fixed? It is very likely that RH4 has a newer version of coreutils than RH3. I also notice you didn't give a version of coreutils on either system. The current (stable) version is 6.7. Maybe you should update and see if that fixes the problem.

--
Matthew
"Have you tried that new mixed drink, 'GDR'"?
"What is it?"
"Gin, Duck and Rum. It tastes fowl."



_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to