I accidentally executed sudo rm /*
instead of sudo rm ./*
inside a directory whose contents I wanted to delete, and I have basically messed up my system.
None of the basic commands like ls
, grep
etc. are working, and none of my applications are opening, like chromium, slack, image viewer etc.
I tried to look up my problem on the internet and found this question, but none of the solutions there work for me.
I am on an Arch Linux desktop, and I haven't logged out of my system since this happened, because I'm afraid I won't be able to log back in, as suggested here. Also, I don't have a live USB of an Arch Linux image file, if that helps.
Any help on how should I proceed further to make my system go back to normal, would be appreciated. Thanks!
EDIT: I'm attaching the outputs of some commands:
$ echo /*
/boot /dev /etc /home /lost+found /mnt /opt /proc /root /run /srv /sys /tmp /usr /var
$ echo /usr/*
/usr/bin /usr/include /usr/lib /usr/lib32 /usr/lib64 /usr/local /usr/sbin /usr/share /usr/src
Also,
echo /usr/bin/*
gives me a long list of directories in the format /usr/bin/{command}
where {command} is any command that I could have run from the terminal had I not messed my system up.
Please let me know if any other information is needed!
rm /*
, and the directories haven't been deleted in/
, just the files. Hope that helps./usr
symlinks (bin -> usr/bin
,lib -> usr/lib
,lib64 -> usr/lib
,sbin -> usr/bin
). Not sure what difference those would make. Maybe the linker is assumed to be in/lib
?/usr/bin/ls
? Can you use/usr/bin/ln
to create a symlink or does that complain about missing/lib
?