I was moving a tar file from the disk. Unfortunately, I misspelled the path, and I lost the file Ubuntu.

sudo mv /media/creator/sumeeth/software/apache-tomee-1.7.0-plus.tar.gz /~ 
  • Did you lose a file named "Ubuntu"? – Peter Mortensen Sep 7 '14 at 16:49
  • you probably wanted to move to ~/ (which is your home directory) instead of /~ (which is a file called ~ in the root directory) – pLumo Dec 19 '17 at 13:23

You did not delete the file. You just moved it into /~ (assuming the command did not return any error). Files on Linux can contain any strange characters. Just move the file back with the reverse command:

sudo mv /~ /media/creator/sumeeth/software/apache-tomee-1.7.0-plus.tar.gz

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