Page 1 of 6 123 ... LastLast
Results 1 to 10 of 52

Thread: People being misled by the malicious commands scare?

  1. #1
    Join Date
    Mar 2007
    Location
    /Earth/USA/MD/Home
    Beans
    826
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    People being misled by the malicious commands scare?

    No, I'm not trying to say that the commands are good. I'm just pointing out an observation that some people's sigs read like this:
    WARNING: Never run a command with sudo rm -rf in it!!!
    Which is completely false and makes it unnecessarily difficult when helping some users. People seem to be missing out on the difference between rm, sudo rm, sudo rm -rf, and sudo rm -rf /. Let me break it down

    rm - Normal delete command
    sudo rm - Delete command with root permissions
    sudo rm -rf - Recursive delete command with root permissions and no checks
    sudo rm -rf / - Deletes all files that root can write to.

    There are crucial differences. sudo rm -rf has many uses. Please stop smearing this command and update your sigs to say
    sudo rm -rf / or other important directories (/home /usr /bin /etc)
    In Soviet Russia, cake lies you!
    My Blog | Email Me

  2. #2
    Join Date
    Mar 2006
    Beans
    2,392

    Re: People being misled by the malicious commands scare?

    Quote Originally Posted by Nekiruhs View Post
    No, I'm not trying to say that the commands are good. I'm just pointing out an observation that some people's sigs read like this:

    Which is completely false and makes it unnecessarily difficult when helping some users. People seem to be missing out on the difference between rm, sudo rm, sudo rm -rf, and sudo rm -rf /. Let me break it down

    rm - Normal delete command
    sudo rm - Delete command with root permissions
    sudo rm -rf - Recursive delete command with root permissions and no checks
    sudo rm -rf / - Deletes all files that root can write to.

    There are crucial differences. sudo rm -rf has many uses. Please stop smearing this command and update your sigs to say
    yup, I agree, I use 'sudo rm -rf insert-directory-here/' all the time, I just don't use it on default and system directories.
    acer e5-571-5552 | i5-4210u | intel hd graphics 4400 | 8gb ram | 128gb ssd
    kubuntu 15.04 x64

  3. #3
    -grubby is offline May the Ubuntu Be With You!
    Join Date
    Aug 2007
    Beans
    Hidden!

    Re: People being misled by the malicious commands scare?

    I fixed it

  4. #4
    Join Date
    Dec 2005
    Location
    Kingston, Ontario
    Beans
    1,919
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: People being misled by the malicious commands scare?

    I'm too paranoid to run sudo rm -rf on any directory, because I often hit return much too soon.

  5. #5
    Join Date
    Aug 2007
    Beans
    59

    Re: People being misled by the malicious commands scare?

    I prefer to let people know what the command does. I mean, if someone just tells you NOT to do something, with no explanation as to why, doesn't that make you just want to do it more?
    sudo rm -rf permanently deletes files. Don't use it unless you KNOW what you are doing!

  6. #6
    -grubby is offline May the Ubuntu Be With You!
    Join Date
    Aug 2007
    Beans
    Hidden!

    Re: People being misled by the malicious commands scare?

    Quote Originally Posted by ntowakbh View Post
    I prefer to let people know what the command does. I mean, if someone just tells you NOT to do something, with no explanation as to why, doesn't that make you just want to do it more?
    good point

  7. #7
    Join Date
    May 2005
    Location
    US
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: People being misled by the malicious commands scare?

    I disagree that it has many legitimate uses, and I cannot think of any situation in which I would advise a new user to type or paste in a command that starts with sudo rm -rf

    Well-intentioned though the helper may be, there is too much room for error if someone hits Enter too early or hits the wrong key.

  8. #8
    Join Date
    Jan 2007
    Location
    Baltimore, MD
    Beans
    841
    Distro
    Ubuntu

    Re: People being misled by the malicious commands scare?

    see next

  9. #9
    Join Date
    Jan 2007
    Location
    Baltimore, MD
    Beans
    841
    Distro
    Ubuntu

    Re: People being misled by the malicious commands scare?

    Quote Originally Posted by ~LoKe View Post
    I'm too paranoid to run sudo rm -rf on any directory, because I often hit return much too soon.
    if you edit you bash config file (~/.bashrc), you can alias common commands that delete/overwrite existing files to prompt you before doing so.

    try this to see what i mean:
    Code:
    touch test   #create an empty file named 'test'
    rm -i test      #will prompt you for confirmation before actually deleting
    if you like this, do what i did and add the following lines to your .bashrc:
    Code:
    #safety commands
    alias cp='cp -i'
    alias rm='rm -i'
    alias mv='mv -i'

  10. #10
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: People being misled by the malicious commands scare?

    Quote Originally Posted by ntowakbh View Post
    I prefer to let people know what the command does. I mean, if someone just tells you NOT to do something, with no explanation as to why, doesn't that make you just want to do it more?
    Agreed. Changed my sig,and finally got rid of Chuck Norris as well

    Anyway, running "rm -rf" without sudo in users home dir would be just as annoying for most people than running it with sudo in a system directory..

    And when giving commands to help people it would always be a good idea to also explain what the commands do.

Page 1 of 6 123 ... LastLast

Bookmarks

Posting Permissions

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