TL;DR at the bottom.
Background:
The following occured on my CentOS 6.10 production server. I was using a browser based terminal program to run the program Midnight Commander which is a console-based file explorer. Unfortunately, the mouse support on this terminal was not setup correctly and I inadvertently applied a mv operation on several files inside the /usr/bin folder. The executables were moved into another directory. I was able to move the files back into /usr/bin, but I wanted to make sure things were restored.
Test on Broken file:
One of the excecutable programs that was moved is a program that is still running. It is called dbus-daemon. I was able to determine that this was process 847 on my machine.
When I run readlink -f /proc/847/exe, it doesn't return anything.
When I run the command ls -l | grep exe in the /proc/847 folder I get
lrwxrwxrwx 1 root root 0 Dec 4 01:01 exe -> \ (deleted)/bin/dbus-daemon
Test on Working file:
I decided to compare this to a normal executable that was not affected by the mv operation. I chose chrond to see if I got the same results. chrond is process 1187 on my machine.
When I run readlink -f /proc/1187/exe, it returns /usr/sbin/crond
When I run the command ls -l | grep exe in the /proc/1187/ folder, I get
lrwxrwxrwx 1 root root 0 Dec 4 01:01 exe -> /usr/sbin/crond*
I hoped that by moving the files back, it would undo the damage. But the commands are not returning the expected results.
TL;DR My question is: If I move a executable out of /usr/bin/, can I move it back with no issues? If not, what else can I do to ensure that I can reboot my machine safely?