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.
wget https://rawgithub.com/simonpauw/cloud9restore/master/restore
chmod a+x restore
mv ./restore ~/bin/restore
restore
The following files can be restored:
file# | last modified | filename
------|----------------|------------------------------------------
0 | (Wed 02-14-18) | ~/pset1/some-file-I-deleted.c
1 | (Wed 04-04-18) | ~/pset1/some-other-file-I-deleted.c
------------------------------------------------------------------
Enter file# to restore (or anything else to quit): 0
Restored ~/pset1/some-file-I-deleted.c
------------------------------------------------------------------
Enter file# to restore (or anything else to quit): q
1 file restored