0

I've made a huge mistake by running rm -r /* on my ubuntu 16.04. But i managed to cancelled the on going command quickly using ctrl-c. Now all my bash is not working. For example if i type 'ls' in my directory, it will show 'command not found'. it seems that all command is affected and i just can use cd command.

what i found out is that my files at /var/www/html is still intact and not deleted and my web application is still running with minor issues.

I have done the change PATH fix but i found out that my /bin is deleted and my home directory is deleted.

Question 1 : is there any way i can repair my ubuntu 16.04 without losing my files at /var/www/html?

Question 2 : is there any way i can salvage my files at /var/www/html?

Hackle
  • 23
  • 7
    Restore a recent backup. – ceejayoz Jul 04 '18 at 01:50
  • You probably lost /dev/ and /etc before /home, so though luck. Try to scp -pr the files away - you might still have /usr/bin/scp and /lib. – kubanczyk Jul 04 '18 at 02:08
  • 3
    Better to set up another server and attach current server disk as secondary to a new server. and restore the required web application data. – Sunil Bhoi Jul 04 '18 at 06:19
  • thanks for the idea, however i think my bash will not work inside the problem server. – Hackle Jul 04 '18 at 06:47
  • 3
    Attach and reboot from a rescue image, and you will be able to copy and safeguard your remaining data. Then you can try to restore from back-up the files you deleted, or decide to deploy a new system and restore your existing data there (by attaching the disk from the server you nuked) - Also: see https://serverfault.com/q/587102/37681 – HBruijn Jul 04 '18 at 07:16

0 Answers0