Linux 101: Homework assignment #1

theSteveCo

Founder
Staff member
First one w/ the right answer wins. Points will be accumulated over the course of the semester and the winner gets an 'A', 2nd place a 'B', etc.

As root, on most modern Linux installations, when you remove a file it prompts you before doing the job...

Code:
[root@www ~]# touch foo
[root@www ~]# rm foo
rm: remove `foo'? y
[root@www ~]#

Three part question:
  • Why does it do this?
  • What's the persistent way to stop the prompting?
  • What's the temporary way to stop the prompting?
    [/list=a]

    PM your answers. Winner will be announced.
 

Atak Kat

Smile!
a) By default, 'rm' is aliased to 'rm -i' for root (safeguard)
b) remove the 'rm' alias in the approrpriate shell startup profile (/root/.profile, or /etc/default/profile, etc) or replace the alias with 'rm -f'
c) [root@www ~]# rm -f foo

what do I win?

btw, yes I'm a newbie to the board. have been 'lurking' for awhile but your linux test finally lured me in. Guess the geek in me caved in! :p

-ak-
 

theSteveCo

Founder
Staff member
Congratulations! You didn't follow instructions and PM the answers, thus you FAIL! :twofinger However, you've now established that future quizzes will be held in a first-correct-post-wins format!

Yes, the command is aliased. Don't forget .[t]cshrc though, not everyone likes BASH.

BTW - you forgot \rm foo .. otherwise you nailed it.

Next question coming soon!

Oh yeah - welc:barfme to the board, c:barfngratulati:barfns on ending your lurking!
 

JackTheTripper

Shotline For Mod
Atak Kat said:
a) By default, 'rm' is aliased to 'rm -i' for root (safeguard)
b) remove the 'rm' alias in the approrpriate shell startup profile (/root/.profile, or /etc/default/profile, etc) or replace the alias with 'rm -f'
c) [root@www ~]# rm -f foo

what do I win?

btw, yes I'm a newbie to the board. have been 'lurking' for awhile but your linux test finally lured me in. Guess the geek in me caved in! :p

-ak-

That's what I was gonna say!:rolleyes;)
 

Devin

Now stunting the twisties
does it matter how i come across the answer?...what if my local unix nut that i work with :D ...guess that would be cheating...:twofinger
 

theSteveCo

Founder
Staff member
Adhering to Open Source philosophy, and borrowing directly from the Perl community...

There is more than one way to do it

If you have someone else answer the quiz, and it's right, and you're first... you WIN!
 
Top