1

I have a wordpress site and my current directory was wp-content

I just wanted to backup and move the current files of the wp-content/ folder to a folder called wp-content-backup20170907 and clone a new wp-content folder...

I ran the command

sudo mv /*  wp-content-backup20170907

And just realised that this moved everything - how can I undo this?

Zanna
  • 72,312
RRowan
  • 143
  • 7

2 Answers2

0

I think you wanted to do a

sudo mv ./* wp-content-backup 

you moved all files and directories in / partition to your wp-content... directory.

I guess (I never did a mv /* ) you may miss one or many bin executables (including the cp, pwd and mv command ) and also the PATH and configuration files in the shell....

I would try to

  1. Move all files and directories back to your / partition

If this doesn't work try #2

  1. Try to boot up and mount manually the partitions and move again all the files and directories back to "/" partition.
0

I couldn't login to server, so booting another one up . Fortunately I have load balanced environment so am cloning other machine which is exactly same. This has worked and back to normal, thanks everyone for your suggestions - if I want still logged in possibly Felipe Gutierrez - https://stackoverflow.com/questions/22444699/ubuntu-gone-wrong-because-of-using-mv could of worked. sudo mv ./* wp-content-backup or I think i will use cp from now on not mv

RRowan
  • 143
  • 7