How do I stop the Y/N prompt to remove files

How do I stop the Y/N prompt to remove files

Post by Dina Ghati » Fri, 18 May 2001 04:57:22



When I try to run   --->  rm filename
I get the prompt rm filename y/n?

I create the file as user1 and remove the file as user2 I don't want to be
asked?
the Y/N?  how can I get around this.

thanks

 
 
 

How do I stop the Y/N prompt to remove files

Post by dh » Fri, 18 May 2001 05:06:06


rm -f filanme

man rm

dave


Quote:> When I try to run   --->  rm filename
> I get the prompt rm filename y/n?

> I create the file as user1 and remove the file as user2 I don't want to be
> asked?
> the Y/N?  how can I get around this.

> thanks


 
 
 

How do I stop the Y/N prompt to remove files

Post by Jan Gerrit Kootstr » Fri, 18 May 2001 08:27:49



> rm -f filanme

> man rm

> dave



> > When I try to run   --->  rm filename
> > I get the prompt rm filename y/n?

> > I create the file as user1 and remove the file as user2 I don't want to be
> > asked?
> > the Y/N?  how can I get around this.

> > thanks

Dina,

------------------------------------------------------------------------------
|
DANGEROUS
|
------------------------------------------------------------------------------
A more dangerous approach is: look in your .profile or the /etc/profile and
find the alias rm='rm -i' and delete this line.

Source the profile again to make it work in your session, you will never be
prompted again unitl you restore the alias.

I would not recommend this approach, not even if you think you know what you
are doing. I wipped an entire Oracle database once, because I was confinced
that was in the right directory. Unfortunately I was not the -i  option was not
there to make me look once more. The end of the story, a DBA and I had to work
all night to restore the damn database structure.

------------------------------------------------------------------------------
|
DANGEROUS
|
------------------------------------------------------------------------------

Regards,

Jan Gerrit Kootstra

 
 
 

How do I stop the Y/N prompt to remove files

Post by nmaaf » Fri, 18 May 2001 08:35:30


you are probably using an alias.
type the commande : alias and look for rm, you will probably see somthing
like : rm = rm -i.
To unalias type unalias !!
(take a look in your .profile or in /etc/profile, you with see alias rm='rm
-i' )

NM

Dina Ghatit a crit :

Quote:> When I try to run   --->  rm filename
> I get the prompt rm filename y/n?

> I create the file as user1 and remove the file as user2 I don't want to be
> asked?
> the Y/N?  how can I get around this.

> thanks

 
 
 

How do I stop the Y/N prompt to remove files

Post by Craig Haarmeye » Fri, 18 May 2001 13:46:54





> > rm -f filanme

> > man rm

> > dave



> > > When I try to run   --->  rm filename
> > > I get the prompt rm filename y/n?

> > > I create the file as user1 and remove the file as user2 I don't want
to be
> > > asked?
> > > the Y/N?  how can I get around this.

> > > thanks

> Dina,

> --------------------------------------------------------------------------
----
> |
> DANGEROUS
> |
> --------------------------------------------------------------------------
----
> A more dangerous approach is: look in your .profile or the /etc/profile
and
> find the alias rm='rm -i' and delete this line.

No! No! Don't delete it. Just comment it out!

- Show quoted text -

Quote:

> Source the profile again to make it work in your session, you will never
be
> prompted again unitl you restore the alias.

> I would not recommend this approach, not even if you think you know what
you
> are doing. I wipped an entire Oracle database once, because I was
confinced
> that was in the right directory. Unfortunately I was not the -i  option
was not
> there to make me look once more. The end of the story, a DBA and I had to
work
> all night to restore the damn database structure.

> --------------------------------------------------------------------------
----
> |
> DANGEROUS
> |
> --------------------------------------------------------------------------
----

> Regards,

> Jan Gerrit Kootstra

 
 
 

How do I stop the Y/N prompt to remove files

Post by Jan Gerrit Kootstr » Fri, 18 May 2001 15:23:02






> > > rm -f filanme

> > > man rm

> > > dave



> > > > When I try to run   --->  rm filename
> > > > I get the prompt rm filename y/n?

> > > > I create the file as user1 and remove the file as user2 I don't want
> to be
> > > > asked?
> > > > the Y/N?  how can I get around this.

> > > > thanks

> > Dina,

> > --------------------------------------------------------------------------
> ----
> > |
> > DANGEROUS
> > |
> > --------------------------------------------------------------------------
> ----
> > A more dangerous approach is: look in your .profile or the /etc/profile
> and
> > find the alias rm='rm -i' and delete this line.

> No! No! Don't delete it. Just comment it out!

How do I do that? I mean which special character does one need for that? As I
suggested before, do not this kind of excercise at all.

- Show quoted text -

Quote:

> > Source the profile again to make it work in your session, you will never
> be
> > prompted again unitl you restore the alias.

> > I would not recommend this approach, not even if you think you know what
> you
> > are doing. I wipped an entire Oracle database once, because I was
> confinced
> > that was in the right directory. Unfortunately I was not the -i  option
> was not
> > there to make me look once more. The end of the story, a DBA and I had to
> work
> > all night to restore the damn database structure.

> > --------------------------------------------------------------------------
> ----
> > |
> > DANGEROUS
> > |
> > --------------------------------------------------------------------------
> ----

> > Regards,

> > Jan Gerrit Kootstra

Jan Gerrit Kootstra
 
 
 

How do I stop the Y/N prompt to remove files

Post by julian.evans » Sun, 20 May 2001 18:36:21








> > > > rm -f filanme

> > > > man rm

> > > > dave



> > > > > When I try to run   --->  rm filename
> > > > > I get the prompt rm filename y/n?

> > > > > I create the file as user1 and remove the file as user2 I don't
want
> > to be
> > > > > asked?
> > > > > the Y/N?  how can I get around this.

> > > > > thanks

> > > Dina,

> --------------------------------------------------------------------------
> > ----
> > > |
> > > DANGEROUS
> > > |

> --------------------------------------------------------------------------
> > ----
> > > A more dangerous approach is: look in your .profile or the
/etc/profile
> > and
> > > find the alias rm='rm -i' and delete this line.

> > No! No! Don't delete it. Just comment it out!

> How do I do that? I mean which special character does one need for that?
As I
> suggested before, do not this kind of excercise at all.

IIRC, in the .cshrc file, or wherever this alias is defined in your account,
to comment out the line:

alias rm='rm -i'

you put a # symbol in as the first character in the line. BTW, I would have
thought this would have been explained in the manual on shells or in one of
the man pages. :-)

I trust this helps some.

Regards,

Julian.

- Show quoted text -

Quote:

> > > Source the profile again to make it work in your session, you will
never
> > be
> > > prompted again unitl you restore the alias.

> > > I would not recommend this approach, not even if you think you know
what
> > you
> > > are doing. I wipped an entire Oracle database once, because I was
> > confinced
> > > that was in the right directory. Unfortunately I was not the -i
option
> > was not
> > > there to make me look once more. The end of the story, a DBA and I had
to
> > work
> > > all night to restore the damn database structure.

> --------------------------------------------------------------------------
> > ----
> > > |
> > > DANGEROUS
> > > |

> --------------------------------------------------------------------------
> > ----

> > > Regards,

> > > Jan Gerrit Kootstra

> Jan Gerrit Kootstra

 
 
 

How do I stop the Y/N prompt to remove files

Post by Jan Gerrit Kootstr » Sun, 20 May 2001 19:54:24









> > > > > rm -f filanme

> > > > > man rm

> > > > > dave



> > > > > > When I try to run   --->  rm filename
> > > > > > I get the prompt rm filename y/n?

> > > > > > I create the file as user1 and remove the file as user2 I don't
> want
> > > to be
> > > > > > asked?
> > > > > > the Y/N?  how can I get around this.

> > > > > > thanks

> > > > Dina,

> > --------------------------------------------------------------------------
> > > ----
> > > > |
> > > > DANGEROUS
> > > > |

> > --------------------------------------------------------------------------
> > > ----
> > > > A more dangerous approach is: look in your .profile or the
> /etc/profile
> > > and
> > > > find the alias rm='rm -i' and delete this line.

> > > No! No! Don't delete it. Just comment it out!

> > How do I do that? I mean which special character does one need for that?
> As I
> > suggested before, do not this kind of excercise at all.

> IIRC, in the .cshrc file, or wherever this alias is defined in your account,
> to comment out the line:

> alias rm='rm -i'

> you put a # symbol in as the first character in the line. BTW, I would have
> thought this would have been explained in the manual on shells or in one of
> the man pages. :-)

> I trust this helps some.

> Regards,

> Julian.

> > > > Source the profile again to make it work in your session, you will
> never
> > > be
> > > > prompted again unitl you restore the alias.

> > > > I would not recommend this approach, not even if you think you know
> what
> > > you
> > > > are doing. I wipped an entire Oracle database once, because I was
> > > confinced
> > > > that was in the right directory. Unfortunately I was not the -i
> option
> > > was not
> > > > there to make me look once more. The end of the story, a DBA and I had
> to
> > > work
> > > > all night to restore the damn database structure.

> > --------------------------------------------------------------------------
> > > ----
> > > > |
> > > > DANGEROUS
> > > > |

> > --------------------------------------------------------------------------
> > > ----

> > > > Regards,

> > > > Jan Gerrit Kootstra

> > Jan Gerrit Kootstra

Julain,

I just use to much different Unix versions (and tools) for my own good, that I
sometimes get confused.

Thanks for the info.

Regards,

Jan Gerrit