set global rm command

Hi,

My team does not have root access however many a times my members logon to the unix server and fire the rm command mistakenly on wrong folder and later realise that they have made a mess.

The rm -i option prompts for a confirmation before actually deleting the files/folders.

I want to force the -i option to all my team members when they fire the rm command inorder to address the concern.

Can you please let me know how can that be addressed?

Hi,
this is usually done by an alias which can be defined in the global profile (/etc/profile for Bourne shell and its descendants like bash, ksh,...).

Top of my head ... i am a dummy.. can you let me know how-to ?

alias rm='rm -i'

Add it to Your /etc/profile

ls -ltr /etc/profile
-rw-r--r--   1 root     sys          965 Jul 13  2007 /etc/profile

whereas I am

id
uid=870(wlsadmin) gid=641(wlsgrp)

How can I get this done?

If you don't have root access, you can't, but have to ask the SA to implement it.

Maybe in this adapted form:

[ $( id -g ) -eq 641 ] && alias rm="rm -i"

That way it would only apply to your group, assuming all your team members are in the same primary group.