ide50-deb icon indicating copy to clipboard operation
ide50-deb copied to clipboard

Added restore50 to bin. This script restores deleted files.

Open simonpauw opened this issue 7 years ago • 1 comments

restore50

This script can restore deleted files in a Cloud9 workspace. This only works for files that you edited in the cloud9 editor.

It mines the versioning database and looks for files that are in this database but not in the file system.

I've created this script for when my own students (that follow cs50 at the University of Amsterdam) accidentally delete their work. I thought it could be useful enough to share with the cs50 community.

Example usage

$ restore50
The following files can be restored:

file# | last modified  | filename
------|----------------|------------------------------------------
    0 | (Wed 02-14-18) | ~/workspace/pset1/some-file-I-deleted.c
    1 | (Wed 04-04-18) | ~/workspace/pset1/some-other-file-I-deleted.c
------------------------------------------------------------------
Enter file# to restore (or anything else to quit): 0
Restored ~/workspace/pset1/some-file-I-deleted.c
------------------------------------------------------------------
Enter file# to restore (or anything else to quit): q
1 file restored

simonpauw avatar Jun 22 '18 08:06 simonpauw

Ah, thanks, an interesting idea! Will review with the team!

dmalan avatar Jun 22 '18 13:06 dmalan