We help IT Professionals succeed at work.

I want to be able to remove oracle things without asking me :  rm (yes/no)

LindaC
LindaC asked
on
Hi experts.

Solaris 5.8.
I want to be able to remove oracle things without asking me :  rm (yes/no)
Also I'am doing a rm -f with no sucess.


/export/home/oracle>rm *.txt
rm: remove crontab_oracle.txt (yes/no)? yes
rm: remove prepaid_summary.txt (yes/no)? yes
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
Use

rm -f

wmp

Author

Commented:
oracle@centurion[ctimsd1]<deadbeef>
/export/home/oracle>rm -f afiedt.buf
rm: remove afiedt.buf (yes/no)?
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
Or do you have an alias?

alias rm

?

Author

Commented:
/export/home/oracle/tmp>alias rm
rm='rm -i'
Brian UtterbackPrinciple Software Engineer
CERTIFIED EXPERT
Commented:
There you go. Instead of using "rm" by itself, use /usr/bin/rm.
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013
Commented:
Yep, that's it!

A workaround would be

\rm -f ...

Author

Commented:
Great!


/export/home/oracle>ls -ltr af*
-rw-rw-r--   1 oracle   dba          287 Mar 14  2003 afiedt.buf
oracle@centurion[ctimsd1]<deadbeef>
/export/home/oracle>/usr/bin/rm af*
oracle@centurion[ctimsd1]<deadbeef>
/export/home/oracle>ls -ltr af*
af*: No such file or directory
oracle@centurion[ctimsd1]<deadbeef>
/export/home/oracle>

Author

Commented:
This also great!
oracle@centurion[ctimsd1]<deadbeef>
/export/home/oracle>\rm -f sqlnet.log
oracle@centurion[ctimsd1]<deadbeef>
/export/home/oracle>ls -ltr sqlnet.log
sqlnet.log: No such file or directory
oracle@centurion[ctimsd1]<deadbeef>
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
... and shorter

Author

Commented:
I choose the Best solution because it was shorter.
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
OK, it's been me who suggested checking for an alias, but who cares ...
CERTIFIED EXPERT

Commented:
rm -i means to ask for confirmation.

rm -f should actually override that alias, but it won't do so in a directory that is write-protected

see http://en.wikipedia.org/wiki/Rm_(Unix)

You would need to do (as root) 'chmod u+w oracle' in /export/home

Author

Commented:
Wollmilk*

I chose your answer as the best solution.  The other person (blu) also help in a very different manner, not the best because it was larger.  


Famous Quote:

In this earth there is space for everyone!

     By Me - Linda Cotto

Explore More ContentExplore courses, solutions, and other research materials related to this topic.