不小心删除了我的 /bin 文件夹?

use*_*316 -9 linux

我在根终端上乱搞,不小心删除了整个/bin文件夹。这很危险吗?我该怎么做才能解决这个问题?

root@laptop:/# ls -l /
total 80
drwxr-xr-x   3 root root  4096 Oct 11 19:10 boot
drwxr-xr-x  16 root root  3360 Oct 11 20:21 dev
drwxr-xr-x 123 root root  4096 Oct 12 10:08 etc
drwxr-xr-x   3 root root  4096 Dec 14  2012 home
lrwxrwxrwx   1 root root    29 Oct 11 19:10 initrd.img -> boot/initrd.img-3.2.0-4-amd64
lrwxrwxrwx   1 root root    30 Oct 11 18:48 initrd.img.old -> /boot/initrd.img-3.2.0-4-amd64
drwxr-xr-x  15 root root  4096 Oct 11 18:54 lib
drwxr-xr-x   2 root root  4096 Oct 11 18:48 lib64
drwx------   2 root root 16384 Oct 11 18:47 lost+found
drwxr-xr-x   3 root root  4096 Oct 11 20:21 media
drwxr-xr-x   2 root root  4096 Dec 14  2012 mnt
drwxr-xr-x   2 root root  4096 May  6 05:27 opt
dr-xr-xr-x 150 root root     0 Oct 11 18:54 proc
drwx------   4 root root  4096 Oct 11 20:40 root
drwxr-xr-x  17 root root   680 Oct 12 10:06 run
drwxr-xr-x   2 root root  4096 Oct 11 19:09 sbin
drwxr-xr-x   2 root root  4096 Jun 10  2012 selinux
drwxr-xr-x   2 root root  4096 May  6 05:27 srv
drwxr-xr-x  13 root root     0 Oct 11 18:54 sys
drwxrwxrwt  11 root root  4096 Oct 12 11:31 tmp
drwxr-xr-x  10 root root  4096 Oct 11 18:51 usr
drwxr-xr-x  11 root root  4096 Oct 11 18:55 var
lrwxrwxrwx   1 root root    26 Oct 11 19:10 vmlinuz -> boot/vmlinuz-3.2.0-4-amd64
lrwxrwxrwx   1 root root    26 Oct 11 18:51 vmlinuz.old -> boot/vmlinuz-3.2.0-4-amd64
Run Code Online (Sandbox Code Playgroud)

Jou*_*eek 7

危险的?不再 - 你已经做了危险的事情。

您刚刚删除了系统中具有属于每个系统所需的基本内容的部分。根据维基百科关于 FHS 的文章, /bin 包含“需要在单用户模式下可用的基本命令二进制文件;适用于所有用户,例如 cat、ls、cp。” 这些在某些情况下非常重要。

假设您想解决这个问题,您可以从正在运行的系统中复制 /bin - 可能是从发行版相同版本的 livecd 中复制过来的。我不完全确定这会起作用。

尽管如此,在您尝试此操作时,请备份所有重要文件,以防出现任何问题。/etc/ /home 和 /var 可能是个好主意,就像使用它的发行版中的 /srv 一样