Find the answer to your Linux question:
Results 1 to 2 of 2
Sir , Is there any way for me to disable force (-f ) options to linux commands like rm. I tried to alias rm -f. alias rm -f = "rm ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    13

    How can i disable force options for linux commands

    Sir ,

    Is there any way for me to disable force (-f ) options to linux commands like rm. I tried to alias rm -f.
    alias rm -f = "rm -i"

    but it shows bad alias name error

    Atleast i want this command to be interactive whether I issue rm ,rm -rf , rm -r etc. Is there any way to do this. I want this to work for all commands not only for rm...

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    Add this to your ~/.bashrc file
    alias rm='rm -i'
    that should work
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...