我不小心运行了此命令
sudo mv /* /applications/minced/
代替
sudo mv ./* /applications/minced/
这就是根目录中剩下的全部
$ /
applications/ dev/ proc/ run/ sys/ tmp/
我仍然与服务器建立有效的ssh连接。我已经打过电话mv
,sudo
并chmod
...直接/applications/minced/bin/
或/applications/minced/usr/bin/
,但没有任何作品,但我可以用自动完成路径找到他们那里。
$ /applications/minced/bin/ls
-bash: /applications/minced/bin/ls: No such file or directory
我已经阅读了《递归还原移动根目录》,但是在LiveCD下安装系统不是我的选择,因为它是VPS,而不是物理计算机。有任何想法吗?
更新
我发现这是由于库链接问题引起的,所以我这样做了
$ export LD_LIBRARY_PATH=/applications/minced/lib/x86_64-linux-gnu/
$ /applications/minced/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /applications/minced/bin/mv /applications/minced/* /
显然我遇到了许可问题。sudo
用链接器调用会引发此错误
$ /applications/minced/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /applications/minced/usr/bin/sudo ...
sudo: effective uid is not 0, is /applications/minced/usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
正如Barafu Albino所建议的那样,我尝试su
使用busybox(.../bin/busybox su -
)进行调用,但是会抛出su: must be suid to work properly
。我猜发生这种情况是因为su
找不到/etc/passwd
和/etc/shadow
。好像我已经完全搞砸了系统。
您的应用程序无法运行,因为它们想要查找库,并且这些库也放错了位置。尝试busybox
直接使用。
bin/busybox ls
应该像ls
这样工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句