I fell so stupid...
I just ran rm /* accidentally, but I meant rm ./* on a cloud server with root access.
Now, no one command works. ls, ssh, sftp... none.
Is there a way to fix that? (Note: params like -r or -f are no used in this case).
|show 3 more comments|
Restore from backup.
Depending on the filesystem you may be able to run an undelete or recovery utility, but it's likely easier and more reliable to just restore from a backup.
Backup is likely your best fix, however if that isn't an option for whatever reason there are some techniques that can help recover deleted files from ext3/4 partitions.
For any of these methods to be effective you want to drop to single user mode and unmount the disk(s) as soon as possible. And preferably run these from a livecd or other recovery environment is also a significantly safer method to avoiding accidental data loss while trying to recover your data.
I won't post an epic on undelete processes as you should try to use the backups first, here are the links I find most helpful.
Be advised that this only works on new moon, after midnight. A short rain dance beforehand might be beneficial. Or not. YMMV.
(Yes, this is Unix' brutal way of teaching unsuspecting users to consider each command carefully before pressing