generate random string

python -c 'import string, random; print "".join(random.choice(string.letters+string.digits) for x in range(6))'

By: kev
2011-11-16 17:22:39

What Others Think

cat /dev/urandom | base64 | head -c 6 4MXeo4
kev · 484 weeks and 1 day ago
python -c 'import os,base64; print(base64.b64encode(os.urandom(6))[:6])' nU4wD3
kev · 484 weeks and 1 day ago
[url=]google[/url] google [google]( [url][/url] [[ | google ]] [online hearts](
tyron099 · 53 weeks and 1 day ago
tyron099 · 53 weeks and 1 day ago
Orthopedic surgery or orthopedics, also spelled orthopaedics, is the branch of surgery concerned with conditions involving the musculoskeletal system. MaxRemind top rank medical billing company USA offers orthopedic medical billing services and medical credentialing services to Orthopedic physicians in all states of USA at lowest rates.
stevematt · 5 weeks and 2 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: