"Daddy, my teacher said there are no words in English that end in j."
Well let's find out. This command will give you a frequency count of ending letters in words of 2 or more characters.
for i in {a..z} ; do printf "$i " ; look . | egrep ".$i$" | wc -l ; done | sort -k2nr

Check access logs for attempts at filesystem walking that "may have been successful" by looking for ../ and successful HTTP status codes (< 400). Then check your code to validate.
cat access_log.202?.?? | awk '$7~/\.\.\// && $9<400'

Sure, you can use pgrep, but I prefer the stats output of ps auxww, so I made a function that gives you the matched output for the passed argument, but excludes the grep itself.
function psgrep(){ f=${1:0:1} ; e=${1:1} ; ps auxww | grep "[$f]$e" ; }
psgrep sshd

BTW, before you go installing Termux from the play store, you should know that they no longer have the latest version there. Its recommended that you get it through the open source F-droid app store.

Show thread

The command line? Who the heck uses that anymore? And certainly not on a cell phone. /s

UNIX™: I have many versions to confuse you
Linux: Hold my free beer!

echo "Is this real life?" | cowsay -n | cowsay -n | cowsay -n | cowsay -n

When was the last time you attended a presentation, training, or workshop that was focused on how to use the command line? What/where was it?

I needed to archive some files that had a unix epoch time in their filename (example: logfile_1620502763.txt). Used awk to compare the time. GNU formatted commands:
date -d "2022-01-01" +%s
find . -maxdepth 1 |awk -F[_\.] '/^logfile_/ && $3<1640995200{print}' |xargs mv -t 2021/

Ever want to make your shell glob wildcards be case INsensitive?
Well these settings will do the trick:
bash: shopt -s nocaseglob
zsh: unsetopt CASE_GLOB

I guess I should have made it more clear, the guy in the picture is not the Michael Sweet who developed CUPS, it's Michael Sweet, the Chirstian Metal singer/guitarist. I mean maybe he used Unix, but given the demons, probably not.

Show thread

This isn't my handy work. I was just searching for Unix quotes.

Don't you love easter eggs
curl -L http://git\.io/unix

After learning the command line, what commands have remained challenging for you to run/use correctly?

Over the years I've learned a lot about security of the command line itself. One way I'll be resharing my knowledge with those in Higher Ed InfoSec is by giving a 3 hour workshop dedicated to the topic on May 3rd at the Educause C&PPC conference. Details: bit.ly/3KEpjSO

Do you work at an organization that still uses 'telnet' (not ssh) for legitimate internal purposes in 2022? For example: using telnet to connect "dumb" terminals to a server. (I'm not talking about using novel stuff like mapscii.me or towel.blinkenlights.nl)

To keep up with the trends, the next major version of bash (v6) is going to include support for blockchain based command line history. I'm going to be able to sell my tweets as NFTs.

Show older
Mastodon

The original server operated by the Mastodon gGmbH non-profit