so any one got an answer why anyone would write a line of code with a ww2 film reference for ****ing things up?
Foobar or foo and bar are terms used to reference something, as a placeholder. The computer science equivalent of using "X" and "Y".
so any one got an answer why anyone would write a line of code with a ww2 film reference for ****ing things up?
Foo and Bar are traditional names used for generic variables in coding examples. And Fubar (****ed Up Beyond All Recognition) is a military term that long predates that movie (which I've never seen).
yes hats why that moive references it
as a total non coder im just trying to work out why a man would write a self destruct line into his code?
how can 1 line of code deleted everything?!?
yes hats why that moive references it
as a total non coder im just trying to work out why a man would write a self destruct line into his code?
All this assumes it's true. Searching on his name throws up pages of news "sources" just circulating the same story over and over again with nobody actually showing any confirmation or a company name.
yes hats why that moive references it
as a total non coder im just trying to work out why a man would write a self destruct line into his code?
Easy to say in hindsight but a good idea to validate any variables immediately before any command that has a destructive effect. Need to make a note to keep that in mind for any future stuff :S
Even better idea to have your backups logically separated from your production systems. It's possible to both set up backups that can only add, not delete, and also to set up file systems that preserve history of all changes.
It's not a self destruct line, but a very powerful command to delete files/folders.
rm -rf will remove files from a folder without being prompted (f = force, r = recursive to include any folders), I'm guessing due to the program messing up, $foo may have held the value of * which $bar may have held nothing or /.
Meaning the command he run was 'rm -rf */' or the likes which will have removed everything from the root directory upwards (root is /), which would be the entirety of the server and anything connected.
Why he would mount backup drives to his file system makes no sense what so ever.
Why you would have rm in a script that has to do with backups is insane!
Can someone explain what that line of code means please?
Seriously I think the guy's professionalism is in doubt.
Can someone explain what that line of code means please?
I'm not sure, You would have thought it would have been explained by now.