20070222

Finding lost files

So a student e-mails me today saying that he doesn't have a grade recorded for one of his programming assignments. I check his folder of turned-in assignments and I can't find it.

Who knows? Maybe I just dropped his homework in a different folder by mistake. Checking through everyone's folders for his will take me a while. I make all of my students put their e-mail address in the comments of their code, so I just run a search on all the *.java files on my computer that have a certain e-mail address with this handy line:

for i in $(find . -name *.java); do grep -H 'emailName' $i; done
(Replace 'emailName' with the descriptive feature of the file you are looking for.)

I still can't find his homework.

1 comment:

Paul E said...

Wow, a real "who done it" mystery.
Perhaps the twist will be "no one" :-)