issue with the cp command!!!
hi all
i have some application packages in my apps filesystem. I need upgrade it. i brought the latest patches (its a java compiled file with 755 permission) and when i tried to copy into the apps filesystem it asks me to overwrite it or not. But i gave " cp -rf .... ****** " command. I am not in the position to delete the old files. It should overwrite. Can someone tell me what could be the problem and how it culd be resolved. I am using RHEL 5. The apps directory (filesystem) permission is 755 and i am doing all these things with root privilege. Thanks in advance Kingston S |
Hi,
Redhat has aliased cp to use the -i flag (interactive), which will always asks if you want to override the file (even though you use the -f flag!!). The following will unalias cp (just for the current session/terminal): unalias cp If all went as planned you will not be bothered with the overwrite question. Hope this helps. PS: use alias cp to see the current setting. |
In alternative (if you want to leave the alias for other uses) you can type a backslash before the cp command:
Code:
\cp file destination |
hi gurus,
both the ways are working fine....Thanks... |
All times are GMT -5. The time now is 11:18 AM. |