-5
One &^%@&& advised me to press alt+f2 and then type the above. And i did it... on my Dad's computer. He's furious now. How to fix this?
-5
One &^%@&& advised me to press alt+f2 and then type the above. And i did it... on my Dad's computer. He's furious now. How to fix this?
2
you basically deleted his user... and all files in it. The machine is not lost, but I am pretty sure the user data is gone for ever.
The key options here was the use of the home directory of the user ~/* and the very wicked z option of shred
shredhttp://manpages.ubuntu.com/manpages/hardy/en/man1/shred.1.html
5The user won't be deleted, just the user's data. The user is still in the system, he'll just have an empty $HOME
. – terdon – 2014-01-11T22:43:51.667
1
Let this be a lesson in doing your own research before taking any advice. A simple man
page lookup from the command line would have warned you off.
Linux has a manual system invoked by typing man
at the command prompt.
Lets trace out what you were instructed to do.
man sudo
sudo allows a permitted user to execute a command as the superuser or another user
So basically, run the following command as root, oopsie!
man shred
Overwrite the selected FILE(s) repeatedly, in order to make it harder to recover the data.
-r recursive
-f force change permissions to allow writing
-z add a final overwrite with zeros to hide shredding
~/* from the user's home directory root
Ouch, not a simple delete here, overwrite the files a default three times, follow the folder structure, change the permissions to allow this on read only files, add a zero overwrite.
Well, at least they weren't totally out to destroy you, you didn't do rm -rf
from /
(and no, don't ever do this unless you want to wipe a drive, you're facing a total system reinstall)
The only way to fix the damage done here is to restore from backups.
"Stuff happens... be prepared for stuff happening" you should replace that and use Murphy's law... – Braiam – 2014-01-12T00:51:55.357
2Seriously? You think we can help if you ask something like this? What operating system are you on? What do you mean "something like that"? If you are on a nix system (sounds like Linux running Gnome, is that correct?) and you ran `sudo shred -rfz ~/` you're basically screwed. Not really anything you can do. You just destroyed your dad's data. Wow, he lets you play on his computer with his username? I bet he won't anymore. – terdon – 2014-01-11T22:19:51.637
3dude... you shan't be just hammerin' code into your computer if you don't even know what it does... at least verify it with someone competent beforehand. – H2CO3 – 2014-01-11T22:27:28.533
1shred is created to delete data permanently, without even leaving "unlinked" blocks on disk with original data. So you've really lost all the current user home content. Now, press alt+f2 and write
sudo transferMoney from=me to=aCharity amount=all
… it'd be a self-explanatory command, so you can decide to run it or not. – ShinTakezou – 2014-01-12T00:00:17.160