bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (Query): Changing the Functionality of rm Command


From: Brian Dessent
Subject: Re: (Query): Changing the Functionality of rm Command
Date: Wed, 17 Aug 2005 18:24:25 -0700

"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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]