Guitars, Paramedics, Linux, and Me

November 25, 2006

Fedora Core 6: Make Your Own Fortune Files

Filed under: Linux — S. Kindley @ 12:56 am
Tags: , , ,

I’ve always wanted to make randomized custom email sigs. I figure the venerable Fortune mod program would fit the bill perfectly for this. After doing a little digging I learned how to do this.

This is an easy one. First locate your fortune files. In Fedora Core 6 they are located in /usr/share/games/fortune and contain plain text files, a corresponding .dat file, and sometimes a corresponding .u8 file. Honestly I am unsure what the .8 files are for. They do not seem to be required.

Next we will create a file for this example called trucker (touch trucker). Next edit the file using your favorite editor (I use nano via command line).

The format used in the file is this:

your text here
more text here
This is a longer text
which will spawn multiple lines

After saving the file in this format simply run the command:

strfile -r filename, in our example strfile -t trucker will do the trick. This command creates the corresponding .dat file. In our exmaple trucker.dat.

Now simple run the command:

fortune trucker

and sit back and enjoy you new fortune. Be sure to check out:

info fortune

for usage information on Fortune.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: