[ Thanks to Jim Finn
for this link. ]
del
“Delete” that file… Then Bring it
Back.
Have you ever deleted a file, and then really regretted it? I have,
so the combination of laziness (recreating files is tedious!) and
boredom drove me to create “del”. “del” is a simple bash script I
wrote that works similar to GNOME’s wastebasket and MS Windows’
Recycle Bin. “del” stores the “deleted” files in $HOME/.garbage,
and it gives you the ability to empty the garbage, list its
contents, and restore a “deleted” file. When placed a users PATH
the use of “del” is quite simple:
jimfinn@jimfinn.marist.net> ls myfile1 myfile2 myfile3 myfile4 jimfinn@jimfinn.marist.net> jimfinn@jimfinn.marist.net> del --list Garbage Empty. jimfinn@jimfinn.marist.net> del myfile1 jimfinn@jimfinn.marist.net> ls myfile2 myfile3 myfile4 jimfinn@jimfinn.marist.net> del --list total 8.0k drwxr-xr-x 2 jimfinn admins 4.0k Sep 7 16:54 . drwxr-xr-x 29 jimfinn admins 4.0k Sep 7 16:21 .. -rw-r--r-- 1 jimfinn admins 0 Sep 7 16:53 myfile1 jimfinn@jimfinn.marist.net> del --restore myfile1 jimfinn@jimfinn.marist.net> ls myfile1 myfile2 myfile3 myfile4 jimfinn@jimfinn.marist.net> del myfile2 jimfinn@jimfinn.marist.net> ls myfile1 myfile3 myfile4 jimfinn@jimfinn.marist.net> del --list total 8.0k drwxr-xr-x 2 jimfinn admins 4.0k Sep 7 16:55 . drwxr-xr-x 29 jimfinn admins 4.0k Sep 7 16:21 .. -rw-r--r-- 1 jimfinn admins 0 Sep 7 16:53 myfile2 jimfinn@jimfinn.marist.net> del --empty jimfinn@jimfinn.marist.net> del --list Garbage Empty.
For more information, e-mail me: jimfinn@marist.net
To obtain “del” please visit:
http://jimfinn.marist.net/cgi-bin/index.cgi?=scripts-del