commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
I used only shuf command.
There are 7 alternatives - vote for the best!
random file from files in directory
Also looks in subfolders
Here's a bash version using an array.
Choose random file from current folder. Avoids using ls.
I use this command to select a random movie from my movie collection..
If you can do better, submit your command here.
You must be signed in to comment.