fortune
Fortune is a command line tool that displays random quotes, proverbs, or witty sayings on Unix-like operating systems. It reads from a collection of text files containing a vast number of humorous, motivational, or thought-provoking statements. Each time the command is run, a different fortune is displayed.
Fortune can be used to provide a quick dose of inspiration, amusement, or reflection to users. It is often used as part of the login process, displaying a random quote or message to welcome users and inject some positivism.
The collection of fortune data files can be customized by users, allowing them to add their own quotes or edit existing ones. The program can also be configured to include offensive or controversial fortunes, providing a customizable experience for each user.
Fortune is a lightweight and simple tool that can be easily integrated into shell scripts or command pipelines for added functionality. It can also be combined with other tools, such as cowsay, to display the fortune in a more visually appealing manner.
Several variants of the fortune command exist, such as strfile, which converts plain text fortune files into a more efficient binary format for faster retrieval. The fortune command also supports different flags and options to customize the output, such as displaying only offensive fortunes or eliminating duplicates.
Overall, fortune is a fun and versatile command line tool that adds a touch of randomness and inspiration to the terminal experience. Whether used for personal amusement or as a quirky addition to scripts or login screens, fortune provides an easy way to inject some variety and positivity into the command line.
List of commands for fortune:
-
fortune:tldr:13c44 fortune: List the available quotation database files.$ fortune -ftry on your machineexplain this command
-
fortune:tldr:3004f fortune: Print a short quotation.$ fortune -stry on your machineexplain this command
-
fortune:tldr:61ecc fortune: Print an offensive quotation.$ fortune -otry on your machineexplain this command
-
fortune:tldr:c4879 fortune: Print a long quotation.$ fortune -ltry on your machineexplain this command
-
fortune:tldr:f60b8 fortune: Print a quotation from one of the database files listed by `fortune -f`.$ fortune ${filename}try on your machineexplain this command