SO recently I tried moving all files in a directory into a directory within the file path I was requesting everything to move from. From the directory /srv/www/wptestsite I ran the command

sudo mv ./* /wordpress

to move everything in the current directory (including Wordpress) into wordpress.

What I think happened is that it moved everything from root into a directory wordpress. What ended up happening was that I got disconnected from the server and now I cannot ssh or ftp into the IP address. Any ideas on how to fix this?

I thought of safe boot command line ssh, reinstall OS, or safe boot

Something to get me in and fix the problem or just reset with a fresh Linux server with CentOS 7 installed.

FTP or pinging the server IP address doesn't work.

  • 1
    What directory were you in when you ran the mv command? – roaima Sep 22 '18 at 16:33
  • 1
    "What I think happened is that it moved everything from root into a file wordpress". Rest assured that if wordpress was a file the command would have failed. If it was a directory though then yes, files and folders would have been moved. – roaima Sep 22 '18 at 16:34
  • @roaima I was in /srv/www/wptestsite, and you are right wordpress IS a directory – GoyaKing Sep 22 '18 at 16:40

If you ran sudo mv ./* /wordpress from the /srv/www/wptestsite directory then you might have filled up the root directory's filesystem (/).

I don't think this should have caused the system to fail to boot, but it might have caused some of the more critical services to fail to start.

Depending on what "safe boot" really means you should be able to use that to get to the filesystems and move the files from /wordpress back to /src/www/wptestsite. I would not recommend a reinstallation of the OS.

  • 1
    Of course, if OP actually typed sudo mv /* /wordpress (or even sudo mv . /* /wordpress), that would explain a broken system. – G-Man Sep 25 '18 at 2:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.