0

I've mistakenly put the following command

sudo mv www_sslcertificaten_nl.key ../../identimo

I wanted to move the .key file two folders down and in another folder, but I forgot to place the filename after it, and now I can't find the file anymore. I've used ls-lah on every nearby folder but the file is nowhere to be found, not even as '....'.

Is there any way to retrieve the file?

Thanks!

1 Answer 1

5

If the relative path ../../identimo denotes a directory, then you will find the file www_sslcertificaten_nl.key in that directory. In this case, it may have overwritten another file if that other file had the same name as the file that you moved.

If the path denotes a file, then the file www_sslcertificaten_nl.key is now called identimo and is located two directories up from where you executed the command (in ../../). The command renamed the file and moved it. Again, if there was already a file with the name identimo in that directory, it will have been overwritten by the file that you moved.

8
  • You're fast as a shark @Kusalananda!
    – anon
    Commented Aug 24, 2018 at 9:57
  • @maulinglawns As a shrek more like it. :-)
    – Kusalananda
    Commented Aug 24, 2018 at 9:58
  • You are far from a troll :-)
    – anon
    Commented Aug 24, 2018 at 10:00
  • Hi Kusalananda, thanks for your reply. The problem is, I think I've renamed the file the same as the already excisting folder 'Identimo' which was two folders down. So is my file now lost because there was already a folder with the exact name?
    – Bas
    Commented Aug 24, 2018 at 10:00
  • 1
    @Bas No, it will be located inside that folder. Also, one usually say "up" about .. as it points to the directory "above" the current directory in the directory hierarchy.
    – Kusalananda
    Commented Aug 24, 2018 at 10:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .