LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-20-2004, 08:37 PM   #1
zeviddalop
Member
 
Registered: Sep 2004
Location: bozeman, montana
Distribution: mandrake
Posts: 32

Rep: Reputation: 15
how do you kill the echo?


just got mandrake and when i use the 'rm' command the shell will echo the command and the target file and i have to type y/n to execute it. i've seen shells where there's no echo and the command is just executed without asking for verification. I was wondering if anyone could tell me how to configure mine to do that. thanks.
 
Old 09-20-2004, 08:41 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
In fact by default rm does no confirmation, but some distros have the "-i" option aliased for your sake.
If you don't want the confirmation either add the "-f" option or execute it without any alias, ie "\rm"
 
Old 09-20-2004, 08:44 PM   #3
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Check your .bashrc or .bash_profile to see if you have an alias on rm something like

alias rm='rm -i'

This is sometimes put in to help stop embarrassing errors. You could also try the option -f.
 
Old 09-20-2004, 08:53 PM   #4
zeviddalop
Member
 
Registered: Sep 2004
Location: bozeman, montana
Distribution: mandrake
Posts: 32

Original Poster
Rep: Reputation: 15
thanks for the help. the -f extension is working fine but now i'd like to be able to enable it permenantly without having to type th -f all the time. And there don'tt seem to be any aliases set in either .bashrc or .bash_profile. Is there another way to do it that you're aware of?
 
Old 09-20-2004, 09:08 PM   #5
caid
Member
 
Registered: Dec 2002
Location: NZ
Distribution: slack current
Posts: 61

Rep: Reputation: 15
you could set your own alias in .bashrc or .bash_profile

e.g.

alias rm="rm -f"


caid
 
Old 09-20-2004, 09:28 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by zeviddalop
thanks for the help. the -f extension is working fine but now i'd like to be able to enable it permenantly without having to type th -f all the time. And there don'tt seem to be any aliases set in either .bashrc or .bash_profile. Is there another way to do it that you're aware of?
Some silly distro-maintainers put things like that
in /etc/bashrc, /etc/profile or a file under /etc/profile.d

You can check whether you have rm defined
to be an alias to rm -i by just typing
alias

You could then just do unalias rm...


Cheers,
Tink
 
Old 09-20-2004, 11:15 PM   #7
zeviddalop
Member
 
Registered: Sep 2004
Location: bozeman, montana
Distribution: mandrake
Posts: 32

Original Poster
Rep: Reputation: 15
thanks a lot Tink! that did it. it was set to 'rm -i'. - zev
 
Old 09-21-2004, 12:48 AM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You're very welcome :)

Which steps to remedy it did you take, just out
of curiosity?


Cheers,
Tink
 
Old 09-21-2004, 02:27 AM   #9
zeviddalop
Member
 
Registered: Sep 2004
Location: bozeman, montana
Distribution: mandrake
Posts: 32

Original Poster
Rep: Reputation: 15
Tink, i just changed the alias for 'rm'. but i just realized something else, after logging off and then back on the original alias is in effect again. when i changed it the first time i just did it from my home directory. how do you make it permanent? - zev
 
Old 09-21-2004, 02:34 AM   #10
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Add the command to .bash_profile or .bashrc

As suggested previously, I would check /etc/profile and the others to find out where it is set as an alias, and comment out that line. This way it takes effect for all users.

Are you sure that you don't want the confirmation though, since it can prevent stupid mistakes?

--Ian
 
Old 09-21-2004, 02:35 AM   #11
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Quote:
Some silly distro-maintainers put things like that
in /etc/bashrc, /etc/profile or a file under /etc/profile.d
Its in /etc/profile.d/alias.sh on Mandrake
 
Old 09-21-2004, 09:12 AM   #12
zeviddalop
Member
 
Registered: Sep 2004
Location: bozeman, montana
Distribution: mandrake
Posts: 32

Original Poster
Rep: Reputation: 15
Thanks demonbane, that did it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What if 'kill -9' fails to kill a task? chii-chan Linux - Newbie 15 03-27-2013 04:47 PM
how to use kill to kill a batch of processes with same name? dr_zayus69 Linux - Software 2 09-03-2005 07:35 PM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 03:32 PM
Kphone echo (echo echo) scabies Linux - Software 0 10-18-2004 03:59 PM
Echo /devPrinting doesn't work, echo /usb/lp0 works, Testpage works, Printing doesn't Hegemon Linux - General 3 08-15-2002 02:13 PM


All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration