"Chawla, Sumit" wrote: > I need to change the functionality of one of the existing binaries of > Linux. For example that of command 'rm'. Please guide how to proceed in that > case. I need to perform some pre-deletion and post –deletion task . For that > I need to either design a hookup function or / to replace the existing rm > binary with some new binary having the same name. Can u please guide in this > regard.
If you want to patch 'rm' then patch 'rm'. I don't really understand the question. If you want to know where to get the source code or how to build it, then ask that. (But this is documented elsewhere, so you should read the INSTALL and README files first.) But it seems like you may be under the impression that patching 'rm' will have a system-wide effect. It won't. It will only affect commands or processes that use /bin/rm to delete files. But rm is just a wrapper around system calls (unlink and rmdir) and most applications that delete files use these syscalls directly. In other words, what you are asking sounds somewhat misguided, so you might consider detailing what you are actually trying to achieve, rather that the particular method you are trying to use. Brian _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
