3

I moved/renamed a folder with .svg-figures using mv fig figs. In my mind, this should have renamed the folder 'fig' to 'figs'. Accordingly, the output from ls showed a folder named 'figs' when I ran it directly after renaming. I never checked that the content was in the folder, but went on to produce a few pdfs using pandoc. Now, when I run ls, the directory 'figs' is no longer listed and I can't find the containing figures anywhere in my system.

I tried sudo updatedb and then locate fig | grep svg (most files in the folder had 'fig' in the file name and the extension .svg). I also tried sudo find / -iname "*fig*" |grep svg, but non of the figures I had in the original directory show up. I also tried looking in ~/.local/share/Trash, but nothing there either.

I thought I was safe first since I use SpiderOak to backup all my files and it also keeps track of deleted files and file versions. However, when I went into the client there is nothing there. Neither of the directories 'fig' or 'figs' are listed either in existing or deleted files. This is a mystery to me, does anyone have an idea of what happened and where I can find my figures? Or is my only hope to use something like photorec to restore all deleted files on the entire partition?

Update

Here is a full list of all the commands I ran from moving the directory to starting to search for it. ll is an alias for ls -al and l is an alias for ls.

2013  mv fig figs
2014  pandoc -s -o out/figs.pdf fig_ce_ms.md 
2015  l
2016  history | grep pandoc
2017  history | grep pandoc | grep svg
2018  cat pandoc-svg.py
2019  cat ~/edu/notes/notetaking_approach.md
2020  "pandoc -f markdown -t plain"
2021  pandoc -f markdown -t plain
2022  pandoc -f markdown -t plain abs_ce_ms.md 
2023  pandoc -f markdown -t plain met_ce_ms.md 
2024  cat met_ce_ms.md 
2025  echo "pandoc -f markdown -t plain" >> ~/edu/notes/notetaking_approach.md
2026  pandoc -o out/figs.pdf fig_ce_ms.md 
2027  pandoc -o out/figs.pdf fig_ce_ms.md --filter=
2028  ls
2029  pandoc -o out/figs.pdf fig_ce_ms.md --filter=./pandoc-svg.py
2030  ls fig_ce_ms.md 
2031  ls figs
2032  ls ../
2033  ls
2034  l
2035  ll
2036  sudo updatedb
2037  locate fig
  • What if you run ls -a where you think the 'figs' directory should be?I doubt you somehow moved it to a hidden folder, but maybe something done in vim changed that. – TokenToucan Apr 28 '15 at 21:09
  • unfortunately not, I updated the question with all the commands I ran – joelostblom Apr 28 '15 at 21:38
  • i took away the vim part, I misremembered that, it was in another terminal panel for another parent folder. – joelostblom Apr 28 '15 at 21:59
  • Since vim can delete folders and files, that might be relevant, as the list you posted doesn't seem problematic. – TokenToucan Apr 28 '15 at 22:43
  • @cheflo; Are you positive that history command #2028 did neither show "fig" nor "figs", and then I'd expect command #2031 would have lead to an error? - Have you maybe manipulated the directories or files through another shell window or shell terminal? Have other users (or automated processes) access to that part of the file system? – Janis Apr 28 '15 at 23:09
2

I managed to restore the folder using the SpiderOak command line client.

SpiderOak --tree-changelog gives a list of all added, moved and deleted files and folders, including a unique ID (4-digit number in my case) for these operations. I then used SpiderOak --restore=$uniqueID --verbose and the folder got downloaded to the directory I had previously specified as my downloads directory for SpiderOak.

Still not sure how it was deleted or why it did not show up as deleted in the SpiderOak GUI, but I'm very happy it's back =) I changed the title a little to helps others looking for similar solutions.

  • This was easier to reference for my issue than any of the SpiderOak documentation, thanks! – mmrobins Dec 16 '17 at 1:26
1

If you already have a directory named "figs" and perform a mv fig figs the "fig" directory will be placed (with all its contents) inside the "figs" directory (so you see the "figs" directory; i.e. the one that was allready existing before). (The renaming that you expect would take place if there is no file named "figs" already.) - This is what I suspect had happened. - Maybe you didn't notice the already existing "figs" directory?

  • thanks for the reply, unfortunately there is no 'fig' or 'figs' folder anywhere... I updated the question with all the commands I ran. – joelostblom Apr 28 '15 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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