linux mv - gone wrong: created 'something' (no directory) in root directory

43 Views Asked by At

I'm a newbie to linux and console-working. Maybe someone can give me a short hint how to solve my problem best?

what I meant to do

I wanted to move a file from a directory a) to directory b) in my home-directory.

What happened:

By accident the destination-path was incomplete:

My command script was:

mv filename.extension /destDirectory
  • filename.extension => the name of the file I wanted to move
  • destDirectory => the name of my destination folder

Without further reflecting it, I confirmed the give error-statement 'Permission denied' by adding 'sudo' to my statement. When I list my root-directory, I can *see *the name of my by accident created 'directory'. If I try to open the directory (cd destDirectory) I get the message it's "not a directory".

what I would like to achive now

  1. I want to tidy up my root directory (without any further massing around!)
  2. I'd like to move the file away from root directory, directly into my home-destination-folder!
  3. for future learning my lessons: what is is if console gives me the hint "it's not a directory?"

Thanks for help :-)!

0

There are 0 best solutions below