3

I am new to linux. I had a folder called "Código" where I kept all of my .h's and .cpp's when I programmed. I wanted to move said folder up one directory and into a new folder called "Code", so in the terminal I typed the following:

mv ./Código ..-Code

Of course, I meant to type:

mv ./Código ../Code

But I forgot that my keyboard was in spanish mode. Now my "Código" folder does not exist. I cant find it with any searches of my file system. I tried cd-ing to "..-Code", "-Code", and ".-Code" and it didn't like that... Can anyone tell me what exactly happened to my folder, and if it's contents are recoverable (without some disk recovery utility)?

I already looked at the man page and did some basic googling but found nothing useful. Wasn't really even sure what to google...

3
  • 2
    I did that and I get a folder called ..-Code in the same folder where Codigo was. The folder name starts with a dot so it is a hidden folder, execute ls -lah and look if it appears. Also, in nautilus (the ubuntu file manager) you can show hidden files by pressing Ctrl+H
    – migrc
    Nov 10, 2016 at 6:55
  • @Zanna Done! :)
    – migrc
    Nov 10, 2016 at 7:30
  • Yeah, woa, sorry for taking so long to do that... Thanks again.
    – The Ledge
    Nov 18, 2016 at 20:23

1 Answer 1

6

I followed your instructions :)

I mean, I created a folder called Código/ and then I executed the same (wrong) command.

What happened was that the folder Código/ was renamed to ..-Code/. The name of the folder starts with a dot (.) so it is now a hidden folder.

Now if you execute ls -a in your terminal, then the folder ..-Code/ should appear (as will every hidden file in the directory).

You can also see hidden files using Nautilus (the Ubuntu file manager) by pressing Ctrl+H.

EDIT: in order to recover ('un-hide') the folder you just need to execute mv ..-Code ./Code and you'll have the folder named like you wanted.

1
  • 1
    Maybe add how to "un-hide" files by renaming it to Code/?
    – grooveplex
    Nov 10, 2016 at 9:16

You must log in to answer this question.

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