What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.

If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

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:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags





Commands tagged cowsay from sorted by
Terminal - Commands tagged cowsay - 10 results
fortune | cowsay $(ls/usr/share/cowsay | shuf -n1)
2014-10-23 10:09:44

To install on centos 6.2

for Centos auto accept:

yum install fortune* -y

yum install cowsay* -y

Removed the -f command as I dont know how, but it works without it.

Almost the same but one folder higher =).

xcowsay "$(cowsay smile)"
echo 'Dir.foreach("/usr/local/Cellar/cowsay/3.03/share/cows") {|cow| puts cow; system "fortune | cowsay -f /usr/local/Cellar/cowsay/3.03/share/cows/#{cow}" }' | ruby
2013-04-15 12:27:38
User: orkoden
Functions: echo

Shows a list of all installed cows saying a fortune. Also lists the cows names. Pic your favorite cow!

Needs cowsay, fortune and ruby installed. The path only applies to OS X with cowsay installed using homebrew. On Linux it might be /usr/share/cowsay/cows/ or similar. Uses ruby just because.

fortune | toilet -w $(($(tput cols)-5)) -f pagga | cowsay -n -f beavis.zen
curl -s http://whatthecommit.com/index.txt | cowsay
files=(/usr/share/cowsay/cows/*); cowsay -f `echo ${files[$((RANDOM%${#files}))]}` `fortune` | toilet -F gay -f term
2011-02-20 05:55:33
User: lkjoel

This command will tell you your fortune, with a nice Ascii Art animal, and it is colorized

You need cowsay, toilet and fortune installed.

On Ubuntu this is:

sudo apt-get install cowsay toilet fortune


aptitude install cowsay toilet fortune
files=(/usr/share/cowsay/cows/*); cowsay -f `echo ${files[$((RANDOM%${#files}))]}` <TEXT>
2011-02-20 05:43:01
User: lkjoel

This will show a random cow with cowsay.

cowsay -l | sed '1d;s/ /\n/g' | while read f; do cowsay -f $f $f;done
fortune | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1)
2010-07-08 02:57:52
User: zed
Functions: ls

You need to have fortune and cowsay installed. It uses a subshell to list cow files in you cow directory (this folder is default for debian based systems, others might use another folder).

you can add it to your .bashrc file to have it great you with something interesting every time you start a new session.

files=(/usr/share/cowsay/cows/*);cowsay -f `printf "%s\n" "${files[RANDOM % ${#files}]}"` "`fortune`"
2010-06-02 14:18:28
User: dog

Can be installed in the root crontab if you want it to update your motd.

If not on ubuntu you need to change /usr/share/cowsay/cows/* to the location of your cow files.