0

I attempted to rename all .el files to the same name but without ending. I used the command mv *.el ./* in my terminal and now my home is pretty much empty. Any suggestions how to revert that or where to look for my files...? This might be a stupid question but I'm unsure where else to ask so I'd also be fine with getting re-directed here.

3
  • Run echo .*. Look for the last entry in the output.
    – muru
    May 11, 2016 at 18:26
  • Uh, sorry. Mean ./*, not .*. The last entry would probably be the Videos folder.
    – muru
    May 11, 2016 at 18:30
  • 1
    Thanks that was it! There is a folder that contains it all. Thank you so much! Feel free to make this an answer and I'll gladly accept or is it too specific so that I should remove the question?
    – SCBuergel
    May 11, 2016 at 18:32

1 Answer 1

4

If your home folder contains:

$ ls ~
1.el  10.el  2.el  3.el  4.el  5.el  6.el  7.el  8.el  9.el  Desktop  Documents  Downloads  Music  Pictures  Public  Stuff  Templates  Videos

And you do mv *.el ./*; the command will likely expand to:

$ echo *.el ./*
1.el 10.el 2.el 3.el 4.el 5.el 6.el 7.el 8.el 9.el ./1.el ./10.el ./2.el ./3.el ./4.el ./5.el ./6.el ./7.el ./8.el ./9.el ./Desktop ./Documents ./Downloads ./Music ./Pictures ./Public ./Stuff ./Templates ./Videos

If you're lucky, the last entry could be a file and mv will complain. If you're unlucky, the last entry in the expanded list is a folder, mv will happily move all arguments to it. So, run echo ./* and look for the last entry (not that there will be many left).

You must log in to answer this question.

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