Jump to content
  • Advertisement
Sign in to follow this  
Hraefn

Can programming screw my computer

This topic is 2112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


the really bad command(That wintertime were probably refering to) would be rm-rf /*
/ is the root directory on a *nix system so everything (included mounted secondary or external harddrives) will have their files deleted (assuming your user has the right to actually delete all files).

 

It's worth noting that this command is infamous enough that in most Linux distributions you will find that the rm utility now features a built-in failsafe which will either ask you if you really intended to erase your entire system, or will outright forbid it without being passed some awkward flag (e.g. --no-preserve-root). So it can be hard to do it accidentally these days on recent operating systems.

Share this post


Link to post
Share on other sites
Advertisement
Even if the current user does not have root access, it still recurses down and wipes out your home directory and any mounted memory sticks (more of a poke in the eye rather than a punch in the face but still not pleasant ;))

Most programming languages provide their own file handling system so it is rare that you would need to call "rm" using system(). This means that it is very unlikely that a developer does this by accident. Edited by Karsten_

Share this post


Link to post
Share on other sites

Even if the current user does not have root access, it still recurses down and wipes out your home directory and any mounted memory sticks (more of a poke in the eye rather than a punch in the face but still not pleasant ;))

Most programming languages provide their own file handling system so it is rare that you would need to call "rm" using system(). This means that it is very unlikely that a developer does this by accident.

 

 

 

 

 

 

Good programs only run and use resources when they are used. Sadly there are more and more bad programs with autoupdaters uselessly phoning home every few seconds the whole time your computer runs or preloaders that are supposed to make a single bloated program start a tiny bit faster (in the rare case you would want to use it) in expense of always slowing down booting and all other programs.

 

As for the danger. There are stupid things you can do like making an "rm -rf *" shell script, but normally your computer should survive.tongue.png

 

What is "rm -rf *" it is a code to deleting system?blink.png

 

it is a unix/linux command, rm is the remove file command. (similar to the "del" command in DOS and the windows command prompt), -rf are flags, r is for recursive (remove subdirectories and their content as well) and -f is for force (no yes/no promts, just do it) and * means all files in the current directory.

 

the really bad command(That wintertime were probably refering to) would be rm-rf /*

/ is the root directory on a *nix system so everything (included mounted secondary or external harddrives) will have their files deleted (assuming your user has the right to actually delete all files).

 

 

 

 


the really bad command(That wintertime were probably refering to) would be rm-rf /*
/ is the root directory on a *nix system so everything (included mounted secondary or external harddrives) will have their files deleted (assuming your user has the right to actually delete all files).

 

It's worth noting that this command is infamous enough that in most Linux distributions you will find that the rm utility now features a built-in failsafe which will either ask you if you really intended to erase your entire system, or will outright forbid it without being passed some awkward flag (e.g. --no-preserve-root). So it can be hard to do it accidentally these days on recent operating systems.

 

Wew,Thank you for the explaination ^^

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!