Commands tagged fun (14)

  • sudo apt-get install sl man sl

    Svish · 2009-04-19 15:24:03 13
  • The British Government entering in the Gregorian era. Show Sample Output

    cal 09 1752
    flux · 2009-04-22 00:13:19 5

  • 8
    fortune | cowsay
    CodSpirit · 2010-05-31 13:23:39 0
  • you could save the code between if and fi to a shell script named with the first argument as and then do a to see if the command succeeded. a bit needless but who cares ;) Show Sample Output

    <commmand>; if [[ "$?" = 0 ]]; then echo ':)'; else echo ':('; fi
    potatoface · 2010-08-23 20:35:31 9
  • Shows "Bang!" in a chance of 1 out of 6, like in the original game with the gun (spin every round). Otherwise, echoes "Click...". If feeling brave you can also do: [ $[ $RANDOM % 6 ] == 0 ] && echo 'Bang!' && a really killer command || echo 'Click...' Show Sample Output

    [ $[ $RANDOM % 6 ] == 0 ] && echo 'Bang!' || echo 'Click...'
    paulera · 2016-03-23 11:09:56 14
  • Outputs utf-8 smileys Show Sample Output

    printf "$(awk 'BEGIN{c=127;while(c++<191){printf("\xf0\x9f\x98\\%s",sprintf("%o",c));}}')"
    ichbins · 2022-04-06 12:10:37 93
  • Generates labyrinth-like pattern on UTF-8 terminal in bash. For fun ;) Show Sample Output

    while ( true ) ; do if [ $(expr $RANDOM % 2 ) -eq 0 ] ; then echo -ne "\xE2\x95\xB1" ; else echo -ne "\xE2\x95\xB2" ; fi ; done
    tobi · 2015-01-17 12:46:37 4

  • 1
    cowsay $(fortune)
    mandroid · 2010-05-31 12:47:06 0
  • Strangely enough, there is no option --lines=[negative] with tail, like the head's one, so we have to use sed, which is very short and clear, you see. Strangely more enough, skipping lines at the bottom with sed is not short nor clear. From Sed one liner : # delete the last 10 lines of a file $ sed -e :a -e '$d;N;2,10ba' -e 'P;D' # method 1 $ sed -n -e :a -e '1,10!{P;N;D;};N;ba' # method 2 Show Sample Output

    seq 1 12 | sed 1,5d ; seq 1 12 | head --lines=-5
    flux · 2009-08-01 00:41:52 5
  • Let Tux bring the fortune cookie

    fortune | cowsay -f tux
    Zaphod · 2010-06-01 09:04:01 0

  • 0
    emacs -f snake
    steadystatic · 2015-11-03 23:34:57 8
  • This is longer than others on here. The reason for this is I have combined two different matrix commands so it would work on all computers. I logged onto my server through a computer and it worked fine. I logged into my server through a mac and it looked $4!t so I have made one that works through both. Show Sample Output

    echo -e "CHECK=SAMPLE" output --command_to_long
    techie · 2013-04-03 08:46:47 1

  • -3
    yum install fortune-firefly; fortune
    madrasi · 2011-01-26 04:32:03 1

  • -6
    figlet -f roman message
    ekinertac · 2013-04-23 02:25:39 2

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

Check These Out

summarize a list of IP addresses, verifying IP address and giving counts for each IP found
Working with lists of IP addresses it is sometimes useful to summarize a count of how many times an IP address appears in the file. This example, summarizeIP, uses another function "verifyIP" previously defined in to ensure only valid IP addresses get counted. The summary list is presented in count order starting with highest count.

Get number of users on a minecraft server
I'm flat-out surprised that minecraft directory services require servers install multiple modifications to their server code, when the directories could fetch this information on their own.

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

graphical memory usage
smem is very clever, it keeps in mind shared memory in its calculations!!!

Set laptop display brightness
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video). $ cat /proc/acpi/video/VGA/LCD/brightness to discover the possible values for your display.

Find broken symlinks and delete them
recursively deletes all broken symlinks using zsh globbing syntax.

Coping files, excluding certain files
Preserve file structure when coping and exclude some file o dir patterns

Dump a configuration file without comments or whitespace...
A short, *easy-er* to remember command for stripping whitespace and comments from a config file, (or any file for that matter). Remember regex as: slash, space, star. pound, slash, bar. pointy-hat, dollar. (or "caret, dollar" if you must) :-P

There weren't any one liners for ettercap on this site... tisk tisk :-) (of course you'll have to plugin your own values for the variables..)

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

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: