Changing the functionality of rm command

S

Sumit Chawla

Hi All
I am required to add some additional functionality to rm command. For
examople displaying the space being freed on deletion of the command.
For that I dont want to make any changes to the existing rm command.
But I need to define some utility with same name as rm. Such that my
utility shpould be called whenevr the user issues the rm utitlity. How
to do that ? Please guide.


Regards

Sumit Chawla("eNetra")
Slogan: "Hail the Invention"
 
G

Giannis Papadopoulos

Sumit said:
Hi All
I am required to add some additional functionality to rm command. For
examople displaying the space being freed on deletion of the command.
For that I dont want to make any changes to the existing rm command.
But I need to define some utility with same name as rm. Such that my
utility shpould be called whenevr the user issues the rm utitlity. How
to do that ? Please guide.


Regards

Sumit Chawla("eNetra")
Slogan: "Hail the Invention"

This doesn't have anything to do with C...

[OT]
Why don't you create a script that computes the size of the
to-be-deleted files and then delete them?
[/OT]


--
one's freedom stops where others' begin

Giannis Papadopoulos
http://dop.users.uth.gr/
University of Thessaly
Computer & Communications Engineering dept.
 
W

Walter Roberson

I am required to add some additional functionality to rm command. For
examople displaying the space being freed on deletion of the command.

That could seriously break your systems administration scripts.
For that I dont want to make any changes to the existing rm command.
But I need to define some utility with same name as rm. Such that my
utility shpould be called whenevr the user issues the rm utitlity. How
to do that ? Please guide.

That smells like a Unix question, and should probably be asked in
a newsgroup appropriate for your brand of Unix.
(Hint: read about PATH)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,458
Latest member
Chris#

Latest Threads

Top