ide50-deb
ide50-deb copied to clipboard
Added restore50 to bin. This script restores deleted files.
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
Ah, thanks, an interesting idea! Will review with the team!