user avatar
Command Line Magic
@climagic
Cool Unix/Linux Command Line tricks you can use in $TWITTER_CHAR_LIMIT characters or less. Here mostly to inspire. Also on mastodon.social/@climagic
$HOME
Joined November 2009
  • user avatar
    Spectacular motherboard cake my daughter made for me. It uses buttercream frosting so it's also vulnerable to meltdown. 101010!!
  • user avatar
    echo "Is this real life?" | cowsay -n | cowsay -n | cowsay -n | cowsay -n
  • user avatar
    "Documentation Examples" Venn diagram
    A Venn diagram showing two circles, one with the label "Examples I need" and the other "Examples int he documentation". The circles do not overlap whatsoever. :(
  • user avatar
    Matrix while :;do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(printf "\U$(($RANDOM % 500))");sleep 0.05;done|gawk '{a[$3]=0;for (x in a){o=a[x];a[x]=a[x]+1;printf "\033[%s;%sH\033[2;32m%s",o,x,$4;printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,$4;if (a[x] >= $1){a[x]=0;} }}'
    00:00
  • user avatar
    telnet mapscii.me # For maps in your terminal from OpenStreetMap. Yes really.
  • user avatar
    inotifywait -e open art.jpg && s=$(stat -c %s art.jpg );h=$(($s/2));r=$((s-h)); dd if=/dev/urandom | grep -a -o -P "[\x01-\xD0]" | tr -d $'\n' | dd of=art.jpg bs=1 seek=$h count=$r # Digitally "shred" half a file after it is opened. #Banksy
  • user avatar
    socat -d -d TCP-L:22,reuseaddr,fork SYSTEM:"nc \$SOCAT_PEERADDR 22" # Confuse people SSHing to your host with a redirect back to theirs.
  • user avatar
    I had an epiphany yesterday. I think I now know why the parent directory in Unix is represented by two dots.
  • user avatar
  • user avatar
    They started using Linux at the fortune cookie factory because they heard they could save a fortune.
  • user avatar
    telnet mapscii.me # For maps in your terminal from OpenStreetMap. Use arrow keys to move around and a/z to zoom in/out. Or use your mouse if your terminal supports that.
  • user avatar
    I like to put sine waves in my log files because that's how I roll. ๐Ÿ˜Ž awk -v cols=$(tput cols) '{c=int(sin(NR/10)*(cols/6)+(cols/6))+1;print(substr($0,1,c-1) "\x1b[41m" substr($0,c,1) "\x1b[0m" substr($0,c+1,length($0)-c+2))}' access_log | less -SR
    A screenshot of an Apache access_log file where a vertical sine wave has been "drawn" into the file using a red background on specific characters.
  • user avatar
    37, the age at which Grace Hopper joined the Navy, learned logic and later invented the compiler. Its never too late to start.
  • user avatar
    curl wttr.in # Get local weather forecast in your terminal curl v2.wttr.in # Get local daily graph of temp/precipitation in your terminal Made by @igor_chubin Thx @jthomerson for the heads up