Selecting a random file
Reason: I have a recurring calendar event, reminding me to test our backup. I do this by restoring one of our websites from tape, run a few tests on it and then delete it again.
To be fair :) and a little safer, I didn’t want to restore the same website over and over again. So random selection it is!
I found this elegant solution:
ls -1 | shuf -n1