Jump to content

  • Log In with Google      Sign In   
  • Create Account

Can programming screw my computer


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
22 replies to this topic

#21   Crossbones+   -  Reputation: 13027

Like
0Likes
Like

Posted 05 November 2013 - 01:22 AM


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.


“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


#22   Members   -  Reputation: 2242

Like
0Likes
Like

Posted 05 November 2013 - 03:58 AM

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_, 05 November 2013 - 03:59 AM.

http://tinyurl.com/vanillapink - Please like my GF's Competition Cosplay Entry for Cosplayzine :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

#23   Members   -  Reputation: 231

Like
0Likes
Like

Posted 05 November 2013 - 04:04 AM

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 ^^






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS