Command Line Magic

rename 's/_(d{4})(d{2})(d{2}).txt/_$1-$2-$3.txt/' *_????????.txt # Rename set of files with non-hyphened date at… https://t.co/H3YtYTKJxq

Wed, 27 Nov 2019 22:03:25 id

mv Picture{,-of-my-cat}.jpg # I find brace expansion useful for renaming files. This cmd expands to "mv Picture.jpg Picture-of-my-cat.jpg"

Wed, 27 Nov 2019 20:33:16 id

watch -n0.1 "grep "[M]Hz" /proc/cpuinfo" # Monitor your dynamic CPU frequency in Linux in real time using the watch… https://t.co/l2JeXXQjtL

Sun, 24 Nov 2019 17:49:33 id


Sun, 24 Nov 2019 01:59:19 id

long_running_command ; [Ctrl-Z] ; bg ; disown ; screen ; reptyr $( pidof long_running_command ) # Suspend and reatt… https://t.co/jhrDwMEjS9

Fri, 22 Nov 2019 22:06:11 id

sudo tail -F /var/log/syslog /var/log/auth.log # A Tail of Two Files

Thu, 21 Nov 2019 17:39:51 id

PROMPT_COMMAND="echo pipe statuses: ${PIPESTATUS[@]}" # In bash, this will show the return status of each command… https://t.co/Xwi9IJfRq9

Wed, 20 Nov 2019 02:20:55 id

convert -evaluate-sequence Min $( for i in $( seq 34 7 99 ) ; do echo $i.png ; done ) every7th-frame.jpg # Using fr… https://t.co/wN2XZeufNR

Tue, 19 Nov 2019 21:43:19 id

RT @fejjaji: TIL: there is two variants of netcat out in the wild. netcat-openbsd and netcat-traditional, and they don't behave the same wa…

Tue, 19 Nov 2019 21:10:34 id

nmap --open -p T:22 # Scan your internal home network for hosts listening on TCP port 22 (SSH protocol).

Tue, 19 Nov 2019 20:29:00 id

mv lego* legos/ # I've always appreciated that mv doesn't stop me from doing this (matching a bunch of other files… https://t.co/ja3EJpABQn

Tue, 19 Nov 2019 19:04:38 id

RT @realgiggls: xclip -o |qrencode -o - |display - Ich liebe Unix :) @climagic

Mon, 18 Nov 2019 20:19:46 id

BTW, I'll be at Supercomputing19 #SC19 tomorrow through Wednesday. Look for a climagic logo t-shirt or badge and sa… https://t.co/KXO4hKOs5h

Sun, 17 Nov 2019 17:24:06 id

I just had a #dream where I was presenting on command line stuff at some conference and was attacked by camera neck… https://t.co/cVWu60HzSY

Sat, 16 Nov 2019 15:12:45 id

awk '$9 == "404" {print $7}' access.log |sort|uniq -c|sort -rn| head -n 50 # List top 50 404 (not found) pages from… https://t.co/agddvDsN5s

Fri, 15 Nov 2019 21:10:29 id

https://t.co/g3QlfdVf7T # Super prompts! For when PS1="u@h:w$" just isn't enough.

Fri, 15 Nov 2019 19:20:47 id

egrep -o "(Donnie|Frank|Roberta|Grandma)" story.txt |sort|uniq -c|sort -r # Search for names and build a frequency count for each name.

Fri, 15 Nov 2019 17:49:41 id

https://t.co/mPoGSlS4uN # Snow in your terminal.

Thu, 14 Nov 2019 21:58:22 id

git log --author=$USER --format="- %B" --since=-7days --reverse |mail -s "What I've done this week" boss@company.c… https://t.co/PPkkHF9E84

Wed, 13 Nov 2019 22:23:38 id

awk -F: '{print $2}' passwords.txt | sort | uniq -d # Print any passwords that are duplicates to find out of any are reused.

Mon, 11 Nov 2019 21:47:23 id

Asterisk Dial timeout option - Number of seconds it tries to dial the device. If not specified, it defaults to 136 years.

Sat, 09 Nov 2019 02:38:28 id

play -n -c1 synth whitenoise band -n 100 20 band -n 50 20 gain +30 fade h 1 86400 1 # Pretend that you're on a star… https://t.co/zeeOHI6GRB

Fri, 08 Nov 2019 18:55:14 id

mplayer -ao null -aspect 32:9 JH_BAwSFKwM.mkv -loop 0 -wid $(xwininfo -int -name "Desktop" |grep "Desktop" |awk '{p… https://t.co/RS08EJuCln

Fri, 08 Nov 2019 17:34:39 id

RT @ianmiell: Which command line commands are core for beginners? So far I have: txt: grep, sed, sort, tail, tee, tr, uniq, wc, diff FS:…

Fri, 08 Nov 2019 17:07:10 id

Someone said you run commands like an owl.

Thu, 07 Nov 2019 23:33:57 id

tail -F firewall.log |while read -r line;do printf "33[38;5;%dm%s33[0m " $(($RANDOM%255)) "$line";done # Random color per log line.

Thu, 07 Nov 2019 19:49:46 id

https://t.co/nP2EdOjVBb # Greg's BASH FAQ is a great place for BASH questions and teaches you "the right way" to do things.

Thu, 07 Nov 2019 18:27:51 id

(head -5; echo; tail -5) < /var/log/syslog # show the first and last 5 lines of the syslog file, including a blank line between them.

Thu, 07 Nov 2019 16:52:43 id

youtube-dl --skip-download --write-thumbnail knGYTLTHV_E # Download just the thumbnail from a youtube video.

Thu, 07 Nov 2019 05:05:34 id

rename 's/ /_/g' * # Rename all non-hidden files under current directory by replacing spaces with underscores. This… https://t.co/pJwpEt0WJv

Wed, 06 Nov 2019 22:47:51 id

dpkg -S $( which notify-send ) # Find which Debian package the notify-send program is included with -> libnotify-bin

Wed, 06 Nov 2019 21:45:09 id

If you think the security of static websites doesn't matter, *imagine* if someone maliciously altered the "copy and… https://t.co/dsynChF7sB

Wed, 06 Nov 2019 19:38:31 id

time cat # A simple stopwatch. Run to start, use Ctrl-D to stop. Check elapsed or real time in output.

Tue, 05 Nov 2019 18:47:40 id

find . -newermt "2015-12-31 23:59:59.999999" ! -newermt "2016-12-31 23:59:59.999999" # Get a list of all files las… https://t.co/elRWj39tAM

Mon, 04 Nov 2019 21:53:08 id

curl -A CLI -sD- bit.ly/gevpxbegerng |awk -F/ '/^Location:/{print $NF}' |(base64 -di||base64 -Di) # Decode the hid… https://t.co/u3JuZJUjOu

Thu, 31 Oct 2019 20:06:40 id

Visual programming languages, for those who want their code to literally look like spaghetti. https://t.co/yG8rzlLeqp

Thu, 31 Oct 2019 00:40:18 id

df -lP |awk '{sum += $3} END {printf "%d GiB ", sum/2**20}' # Show the total space used on all your local disk partitions.

Wed, 30 Oct 2019 20:56:35 id

awk '$2~/[^0-9]/{print FILENAME}' 2019* |uniq # Print the filenames from 2019* that have a non-number somewhere in… https://t.co/vYsOjuuBIu

Wed, 30 Oct 2019 19:26:42 id

ls -d D* # If your file globbing matches subdirectory entries (Such as Downloads and Documents), it's helpful to us… https://t.co/yxoZLBT4Zc

Wed, 30 Oct 2019 18:05:12 id

mplayer -vo png -ss 3:46 -frames 20 stairs.mp4 # Write out 20 png format frames from a video starting at 3 minutes, 46 seconds.

Wed, 30 Oct 2019 16:27:52 id

Whoever labeled this USB-A port is having a good laugh right now. https://t.co/8L2wN97b3x

Mon, 28 Oct 2019 22:16:15 id

scp [^0-9]* user@remoteworkstation:Pictures/ # Because all the unprocessed images had filenames starting with numbe… https://t.co/qcMtMxtyRW

Mon, 28 Oct 2019 20:07:54 id

Tip: Sometimes you get yourself into weird situations/trapped signals where Ctrl-C and Ctrl-| don't work. Try Ctrl-z and kill %1.

Sun, 27 Oct 2019 00:46:37 id

clear ; for t in "Wake up" "The Matrix has you" "Follow the white rabbit" "Knock, knock";do clear;pv -qL10 <<<$'e[… https://t.co/31Iv9hwPFx

Sat, 26 Oct 2019 23:02:44 id

echo 'Hello, my username is imontoya, you kill -9 my $PPID, prepare to vi.'

Sat, 26 Oct 2019 21:48:17 id

find . -empty -type d # List of empty subdirectories under current directory.

Sat, 26 Oct 2019 20:38:24 id

at 6am <<<'curl -Ls https://t.co/U77epeAgCY | egrep -q "(red|yellow) light" && echo "school closed/delayed" | mail… https://t.co/JSX1CMkGUg

Sat, 26 Oct 2019 19:37:56 id

TEXT="measure the length of this text" ; echo ${#TEXT} # One way to print out the length of text using a variable.

Sat, 26 Oct 2019 18:34:06 id

i=0;ls -1 *.jpg|head -60|shuf|xargs -n 6|while read a b c d e f;do n=null:;montage -adjoin -frame 0 -tile 3x4 -mode… https://t.co/XdZK1rODnw

Sat, 26 Oct 2019 17:07:48 id

echo ${PIPESTATUS[@]} # Show the return values of each command in a pipeline as one string. Or use an index number for the Nth command.

Fri, 25 Oct 2019 23:29:27 id

fish # This is an interesting shell that provides color syntax on commands while you are typing them and tab on options provides help.

Fri, 25 Oct 2019 21:52:41 id

https://t.co/V5oAVlvL8w # This website is a tool that will break up a command into it's parts and provide you with… https://t.co/CPPl7sOvug

Fri, 25 Oct 2019 20:28:36 id

for i in {1..997};do printf "%0${i}d"|grep -P "^0?$|^(00+?)1+$" >/dev/null ||echo $i;done # Primes using Perl rege… https://t.co/ucVgvBDAnB

Fri, 25 Oct 2019 19:08:57 id

https://t.co/NRWZiziD7m # Another list of SMS gateways. In JSON format! :-/

Thu, 24 Oct 2019 06:32:38 id

while ps -p 5637 >/dev/null; do sleep 5;done; echo "done"| mail -s foo 8125551234@vtext.com # Notification when pid 5637 done

Thu, 24 Oct 2019 05:01:40 id

https://t.co/EiPqL5z00u # climagic video: Brace Expansion and You! How to use brace expansion in your daily life.

Thu, 24 Oct 2019 03:47:20 id

tar pzcvf /var-backup.tar.gz /var --exclude=/var/lib/{mysql,pgsql} # If for some reason you wanted to exclude two c… https://t.co/4tfctsxXEL

Thu, 24 Oct 2019 02:09:56 id

rm ./-file-starting-with-dash # One way to handle files starting with a - in CWD is to prefix them with ./

Thu, 24 Oct 2019 00:21:31 id

printf "%3d %3d %3d %3d %3d %3d %3d %3d %3d %3d " $( echo {1..10}*{1..10}; | bc ) # Print a multiplication table.… https://t.co/NHFgSWl7GX

Wed, 23 Oct 2019 22:33:49 id

The other day I was in a sales demo and the sales engineer opened up a terminal. 😊 Then he tried to run his home directory. 😩

Tue, 22 Oct 2019 00:53:58 id

[Ctrl-R] % # In #vim insert mode, insert the current filename exactly as it was given in the command argument into the document.

Fri, 18 Oct 2019 00:06:22 id

grep -rh ^use --include="*.pl" --include="*.pm" . | sort | uniq -c # Not perfect, but gives you a start on the Perl… https://t.co/yP8t54sOPM

Thu, 17 Oct 2019 23:00:18 id

paste --delimiter=' ' 1.csv 2.csv # "zip-merge" two files line by line. Using a newline between each line of each file.

Thu, 17 Oct 2019 21:38:46 id

cut -d: -f2-4,7 --complement </etc/passwd # Cut the complement of columns 2-4,7. So in other words, gives you 1,5-6,8-.

Thu, 17 Oct 2019 20:25:47 id

sudo(){ sudo $@ || play homer-doh.wav; } # The other way people pronounce sue dew.

Thu, 17 Oct 2019 00:17:29 id

du -sh * | sort -h # Sorting du output by human readable size. Your version of sort may not have the -h option yet.

Wed, 16 Oct 2019 23:01:03 id

dig org +dnssec # Use the +dnssec option to make dig return DNSSEC records for the .org TLD.

Wed, 16 Oct 2019 21:43:01 id

find . -type f -name '*.css' -print0 | xargs -0 grep -i button # Search for button, recursive in all CSS-Files. Use… https://t.co/WiWQnAj5vK

Mon, 14 Oct 2019 15:58:52 id

curl https://t.co/dYZ4OsBusp # Easy way to find your public IP address that is friendly to CLI users. There are man… https://t.co/4s9a4QhI9y

Sat, 12 Oct 2019 19:36:51 id

Chuck Norris can use "cd .." to break out of a docker container. https://t.co/2gcFnuexxK

Sat, 12 Oct 2019 18:56:58 id

[Ctrl-d] # This indicates to the program that there is no more input. In the shell, this usually closes the shell.

Sat, 12 Oct 2019 18:41:25 id

[Ctrl-u] # Delete everything from the cursor to the beginning of the line. This can also be used to clear a password attempt and start over.

Sat, 12 Oct 2019 18:15:25 id

[Ctrl-w] # Delete the previous word on the command line (before the cursor). This is highly useful when reusing old commands.

Sat, 12 Oct 2019 07:58:26 id

[Ctrl-l] # This is usually equivalent to running 'clear'. Its usually quicker and doesn't leave the command in your command line history.

Sat, 12 Oct 2019 07:13:51 id

[Ctrl-_] # Incremental undo of command line edits.

Sat, 12 Oct 2019 06:32:05 id

[Meta-#] # Comment out the current command from the beginning of the line. Faster than [Ctrl-a] then #.

Sat, 12 Oct 2019 05:39:08 id

zless, zgrep, zcat, zdiff # There are helper commands for dealing with compressed files (gz, bz2 and xz). They have a z, bz or xz prefix.

Sat, 12 Oct 2019 05:05:07 id

Remember that certificate you created 10 years ago with a 10 year expiration time thinking you wouldn't need to wor… https://t.co/JVkE6mJguK

Sat, 12 Oct 2019 04:16:28 id

[Meta-.] # Insert the last argument from the previous line in the command history into the current line. This is di… https://t.co/SsgpM3eWMD

Sat, 12 Oct 2019 03:33:34 id

Those asking "Why not use Home and End?" These aren't setup in every distribution or are setup incorrectly. Some keyboards also lack them.

Sat, 12 Oct 2019 02:50:34 id

[Ctrl-e] # Move your cursor to the end of the line. Faster than holding down right arrow.

Sat, 12 Oct 2019 02:15:50 id

[Ctrl-a] # Move your cursor to the beginning of the line. Faster than holding down left arrow. In screen, you need to press <Ctrl-a a>

Sat, 12 Oct 2019 01:20:53 id

[Ctrl-r]string # Reverse search through your command history for 'string'. Press Ctrl-r again to continue searching backwards. ESC when done

Sat, 12 Oct 2019 00:25:14 id

ascii || man ascii # The || logical OR operator will run the second command only if the first command fails. For in… https://t.co/siQlWSZGyt

Fri, 11 Oct 2019 23:51:44 id

tmux # tmux is a great program that manages multiple terminal sessions and allows you to detach/reattach to the session. Also screen, dvtm.

Fri, 11 Oct 2019 22:56:02 id

ps auxww | tee output.log # Use the 'tee' command to save a copy and see the output of a program at the same time.

Fri, 11 Oct 2019 22:12:59 id

man -k sound # Use -k to search for something in all man pages, like 'sound'.

Fri, 11 Oct 2019 21:40:24 id

help cd # There are several commands inside bash called 'built-ins'. You can access info about them using 'help builtin' or just run 'help'

Fri, 11 Oct 2019 20:56:01 id

RT @BellLabs: Photographer and web enthusiast @PeterAdamsPhoto asks, “What if Ken Thompson went to Woodstock in 1969 instead of inventing #…

Fri, 11 Oct 2019 20:40:47 id

Achievement unlocked https://t.co/QsLvyyAaeg

Fri, 11 Oct 2019 20:39:23 id

ls -ltrah # Print detailed list (-l) of all (-a) files reverse sorted (-r) by last modified time (-t) and with human readable size (-h)

Fri, 11 Oct 2019 19:58:18 id

pushd and popd are also common programs you can use for moving around the filesystem. See 'help pushd' and 'help popd' for info.

Fri, 11 Oct 2019 18:59:42 id

cd - # Takes you back to the previous directory you were in.

Fri, 11 Oct 2019 18:28:33 id

Today I'm going to be posting about 20 useful commands and keystrokes to help make you more efficient. I usually post these every 6 months.

Fri, 11 Oct 2019 18:01:23 id

cd # (With no arguments, not even the #) Takes you back to your home directory from wherever you are.

Fri, 11 Oct 2019 17:47:25 id

If you still use iTerm2 on Mac, you will want to be aware of this newly discovered remote code execution vuln: https://t.co/4BMopTN1TQ

Fri, 11 Oct 2019 17:01:58 id

RT @LeahNeukirchen: Enjoy: Ken Thompson's Unix password https://t.co/r58gTT1DDB

Thu, 10 Oct 2019 16:42:25 id

90% said yes. I find these results quite satisfying. https://t.co/QBzxK50lsQ

Wed, 09 Oct 2019 21:23:20 id

RT @krisnova: Would you go see a talk that was presented exclusively from a linux terminal?

Wed, 09 Oct 2019 16:11:02 id

RT @Quuux: @climagic reminds me https://t.co/5OPFSEdYUv

Sat, 05 Oct 2019 01:53:34 id

Have you ever kill -9'd a process?

Sat, 05 Oct 2019 00:19:04 id

pasteunwrap(){ { xsel -b || pbpaste; } 2> /dev/null | tr ' ' ' ' | { xsel -b || pbcopy; } 2> /dev/null; } # Func… https://t.co/8aa37mvofR

Thu, 03 Oct 2019 21:51:07 id

Unix-like features you really miss when using cloud services. Go.

Wed, 02 Oct 2019 23:16:44 id

RT @ExaGridDba: Check a json file $ cat t.json { "k": "v" } $ jq < t.json . > /dev/null $ cat t.json { "k": "v" }} $ jq < t.json . >…

Mon, 30 Sep 2019 21:11:57 id

sleep 1 ; for i in {1..50} ; do xdotool type "Dgz-.15^Mrz5^M" ; done # Using xdotool, you can automate keypresses a… https://t.co/clkmv9V8gh

Mon, 30 Sep 2019 05:08:49 id

for i in IMG_{4550..4622}.JPG ; do [ -e $i ] && convert $i -quality 75 -resize 50% ~/legoframes/$i ; done # Resize… https://t.co/Tavi82dEm8

Sun, 29 Sep 2019 19:01:46 id

RT @binarytemple: @climagic @domchristie use turndown service to convert all html files to markdown (zsh) `for f in ./*.html ; do curl -XPO…

Thu, 26 Sep 2019 21:20:28 id

Poetic command options: docker build --no-cache

Tue, 24 Sep 2019 01:54:24 id

Network trouble excuse: ICMP Echo Response packets sent through Large Hadron Collider via routing table. That expla… https://t.co/7JL6cbqCP2

Fri, 20 Sep 2019 23:25:09 id

On a Linux desktop, do you ever find yourself closing the GUI software upgrade window and instead doing the upgrade… https://t.co/1OkExZXnac

Fri, 20 Sep 2019 16:04:57 id

RT @TrustedCI: Cybersecurity Center of Excellence (@TrustedCI) receives $12.5M renewal grant from @NSF. Fresh five-year funding ensures con…

Fri, 20 Sep 2019 05:07:53 id

The Internet has serious integrity issues and I ain't talking about the technology.

Fri, 20 Sep 2019 03:22:42 id

RT @haggen: Gonna read one verse every night. https://t.co/fVOqucxFxe @climagic

Thu, 19 Sep 2019 16:34:42 id

PDP11/70 front panel recreation #Unix50 https://t.co/rd7NLWQSVp

Sun, 15 Sep 2019 01:41:34 id

"Space Cadet" keyboard. It is a bit overwhelming to use. https://t.co/0zSr0D8hmh

Sat, 14 Sep 2019 21:47:12 id

Climagic / 8-bit guy (https://t.co/eOUexgGtwF) crossover https://t.co/7fjNiiqYad

Sat, 14 Sep 2019 21:01:01 id

Old Ma Bell Unix, vi and C quick reference guides. And yes, it shows how to quit vi on the 2nd page. #Unix50 https://t.co/0eN8VYyoYK

Sat, 14 Sep 2019 20:46:47 id

Climagic / @lazygamereviews crossover https://t.co/lmASNjev2B

Sat, 14 Sep 2019 18:10:45 id

Unix on a C64 with GeckOS. Thanks @gholmer and @afachat https://t.co/UqaQFFOvba

Sat, 14 Sep 2019 17:40:57 id

Since it's Unix's 50th anniversary this summer, I decided to visit Vintage Computer Festival Midwest… https://t.co/BH3dVu1hAJ

Sat, 14 Sep 2019 00:42:34 id

Just watched a project presentation which showed their financial model included a line model specifically for syste… https://t.co/t2m7RMCb3u

Fri, 13 Sep 2019 17:53:32 id

RT @adamhotep: `grep -C0 PATTERN` will delimit between non-contiguous matching lines. I had never tried asking for "zero context" until tod…

Fri, 13 Sep 2019 00:49:03 id

grep "> From: " LocalMailFolder | egrep --col=never -o "<.+" | tr -d '<> =' | sort | uniq # I needed to grab the e… https://t.co/Xmk9zJSrfH

Mon, 09 Sep 2019 18:08:41 id

Today in history in 1941, Dennis Ritchie was born, and the world would never be the same again. A life is a powerfu… https://t.co/AuMr6hpI15

Mon, 09 Sep 2019 16:46:11 id

Orchestra value return type: String LOL! https://t.co/TV2AGyjXBy

Sun, 08 Sep 2019 20:55:21 id

https://t.co/5G8QuXWXaV # Regex based crossword puzzle. It's good fun practice and keeps you sharp. Plus you can te… https://t.co/oB1yMpsQfJ

Fri, 06 Sep 2019 17:22:25 id

echo | { xsel || pbcopy; } # Copy a newline to your clipboard so you can paste it into brain dead web applications… https://t.co/7sWAzhNSo4

Tue, 03 Sep 2019 16:25:36 id

sed 's/./& /g' ids.txt | sort | uniq # Produce a list of all the unique characters used in a file. Useful if you n… https://t.co/9uysuKZPHG

Fri, 30 Aug 2019 21:13:11 id

Me after hour 1 of 2 of letting a colleague use my laptop. https://t.co/kvTAYT1vGj

Thu, 29 Aug 2019 20:58:15 id

yes $COLUMNS $LINES|awk 'BEGIN{x=y=e=f=1}{if(x==$1||!x){e*=-1};if(y==$2||!y){f*=-1};x+=e;y+=f;printf "33[%s;%sH",… https://t.co/Rrxn3erQZu

Wed, 28 Aug 2019 17:42:12 id

No love for closed source https://t.co/PWUbG0Pp2T

Tue, 27 Aug 2019 20:13:06 id

find . ( -name '*.txt' -o -name '*.md' ) ! -empty # Find .txt or .md files under the current directory that are not empty (> 0 bytes).

Tue, 27 Aug 2019 17:57:16 id

ls -l --full-time || ls -l -T # If the date provided by -l isn't giving you enough detail (omitting time of day), t… https://t.co/VcyYnkPQ3D

Mon, 26 Aug 2019 20:25:46 id

curl --remote-name 'http://www.example.com/images/IMG_[0001-0176].JPG' # Download images in sequence IMG_0001.JPG through IMG_0176.JPG

Wed, 21 Aug 2019 17:17:55 id

resolvectl status systemd-resolve --status journalctl -u systemd-resolved -f sudo systemctl edit systemd-resolved s… https://t.co/ANkeOEZrjp

Sat, 17 Aug 2019 15:14:30 id

sudo iwconfig wlan0 # Show details about your WiFi connection (interface wlan0) including wireless speed and quality. Thx @feressiadis

Fri, 16 Aug 2019 21:04:15 id

split -l 500 largefile splitfile- # Split a file into 500 line files called splitfile-xaa, splitfile-xab, etc. Usef… https://t.co/S4ki8F8twv

Fri, 16 Aug 2019 20:39:44 id

split -b 1G verylargefile split- # Split a file called largefile into 1 gigabyte pieces called split-xaa, split-xab, split-xac ...

Fri, 16 Aug 2019 20:18:04 id

apt-file search /usr/bin/strings # On Debian and derivatives, figure out what package you need to install to get th… https://t.co/dKArA7QUk7

Thu, 15 Aug 2019 18:26:40 id

Intel gigabit nic: "I'm tired." [hardware breaks] Put in 20 year old Netgear FA310tx to fix/diagnose. Intel nic got… https://t.co/3qot5UAY7r

Thu, 15 Aug 2019 06:32:25 id

dd if=/dev/xvdf bs=1M skip=800 | tr -d '00' | less # The dd command has a skip option that can help you start you… https://t.co/5bERf9ZbqN

Wed, 14 Aug 2019 17:17:13 id

RT @vboykis: Drafts I had to delete because they were going nowhere fast. https://t.co/mqz69Qz00f

Sun, 11 Aug 2019 00:08:49 id

My dad doesn't seem to be aware that he keeps telling me the same UDP joke over and over again.

Fri, 09 Aug 2019 20:55:29 id

t stream search -l security | awk '!/ RT @/' # Stream list all the tweets including the word 'security', but filte… https://t.co/4ZKFu99Q1W

Thu, 08 Aug 2019 22:33:05 id

ping | stdbuf -oL awk -F[= ] '/from/{ms=$(NF-1); print ms/1000.0 " " 1-ms/1000.0}' | while read on off ; d… https://t.co/d4nDLViZNH

Wed, 07 Aug 2019 21:54:05 id

find . -iname '*expenses*' # Remember, find has a case insensitive way to search for filenames: -iname

Tue, 06 Aug 2019 16:41:25 id

Question for vi users with non-latin character keyboards. How are vi commands typed if you don't have latin charact… https://t.co/rXgYmHCoHZ

Mon, 05 Aug 2019 15:02:51 id

How about you. Are you OS agnostic?

Wed, 31 Jul 2019 22:11:25 id

nc -q1 -lvp 1234 < file.txt # poor man's file serve. Use nc serverhost 1234 > output.txt to retrieve file from remote host. NAT bugs this.

Mon, 29 Jul 2019 22:46:05 id

I'm at #PEARC19 @PEARC_19 this week. Are you here too? Say hi. You can find me by spotting my climagic badge. https://t.co/vvn38HJrKR

Mon, 29 Jul 2019 19:06:55 id

Happy 60th Birthday to Keith Bostic, developer of nvi, Berkley DB and one of the principle developers of BSD Unix.

Fri, 26 Jul 2019 21:12:51 id

du -sh * | sort -h # Show file size in human readable fashion (MB, GB, etc.) and sort by the human readable amount. Requires GNU sort.

Thu, 25 Jul 2019 18:04:13 id

xev # This X program is useful for seeing the keycodes and symbols generated by your keyboard. Go ahead, run it now… https://t.co/FgIgm22Ex5

Thu, 25 Jul 2019 05:16:01 id

RT @archang3l_media: @climagic Setting defaults for shell variables is magic in bash: ${VAR:-use_this_if_var_is_undefined} simply beautiful

Wed, 24 Jul 2019 00:18:43 id

Papa bear ran 'last -da -20' and said "Look! Someone's been logging into my server".... (Now your turn)

Tue, 23 Jul 2019 17:28:35 id

look discover # Find all the dictionary entries starting with disocover so that you can find out what the proper 'a… https://t.co/4CGl26cikE

Mon, 22 Jul 2019 23:36:23 id

while true ; do sleep 120 ; killall -9 blender ; done # I was testing the latest beta version of Blender 3D, but ha… https://t.co/jnvJAbQLCj

Mon, 22 Jul 2019 20:32:34 id

tail -f messages | awk '/ec:8a:dc:09:e1:2f/' # I find it easier to use awk to search for lines with a string when u… https://t.co/lbewuOWVtb

Fri, 19 Jul 2019 00:21:37 id

[Line separators in various systems] Unix: LF Windows: CR LF HTML: Line separators? We ain't got no line separators… https://t.co/bvaRxeBgrN

Thu, 18 Jul 2019 06:58:28 id

RT @neil_h_watson: { myjob; xmessage DONE; } & # alert me when a job is done so I don't have to waste time watching it. { sleep 5m; xmessa…

Thu, 11 Jul 2019 20:36:33 id

RT @jdpearce: Everyone is sharing the Zoom vuln, but the crucial bit is this : $> lsof -i :19421 $> kill -9 <pid> $> rm -rf ~/.zoomus $> t…

Thu, 11 Jul 2019 03:10:42 id

Hey kids, can you spot how this mock scientist research desk on display at an aquarium is related to the command li… https://t.co/GsrGZJl7l1

Tue, 09 Jul 2019 22:21:38 id

Me: sleep 8h My Hotel Neighbor: wall "Fsck! Fsck! Fsck! Fsck!"

Tue, 09 Jul 2019 01:37:09 id

Control character origins (^G = BEL) https://t.co/ISOTzRZZLU

Mon, 08 Jul 2019 00:19:13 id

telnet https://t.co/7bHskSM7kt # For maps in your terminal from OpenStreetMap. Use arrow keys to move around and a… https://t.co/74GV79RQjv

Sun, 07 Jul 2019 17:57:00 id

Hey I think I can win this game. 😜 https://t.co/4HrPn25rDx

Sun, 07 Jul 2019 04:15:02 id

RT @nixcraft: I like my beer like I like my Linux operating system, free and open! CEO must be a fan of Unix like systems. Thanks https://t…

Fri, 05 Jul 2019 15:57:19 id

curl -s -L t.co/YG3gLKwG9G | grep -o -P '(?<=<meta property="og:description" content="“).*(?=”">)' # GET the tw… https://t.co/FJSvrTIMmR

Thu, 04 Jul 2019 21:07:55 id

dig whydoesmyjunkhurt.private​.search @ # Are you letting Google know your personal issues via DNS? Try to s… https://t.co/xPSQVupcPw

Wed, 03 Jul 2019 21:10:30 id

curl -L https://t.co/li9aOMxny8 | egrep -o ".{0,500}find with prune.{0,500}" # On the web you can encounter some ex… https://t.co/9WrY4f857I

Wed, 03 Jul 2019 14:14:43 id

wget 'https://t.co/e5tXDTI85W' # When copying a URL to the command line, you should use single quotes around it to… https://t.co/KuKnllrk6a

Tue, 02 Jul 2019 17:14:33 id

gunzip when the partition is nearly full https://t.co/VkjbDjCpJl

Mon, 01 Jul 2019 18:57:26 id

These "E" books are still working after 4300 years. We need to do better with our own data. https://t.co/q73BE8yWah

Sun, 30 Jun 2019 16:36:45 id

for d in {0..364} ; do date -d "2019-01-01 + $d days" +%Y%m%d ; done # Sometimes you want to generate a list of val… https://t.co/CbZRv2OcAP

Mon, 24 Jun 2019 18:03:51 id

Requests; What aspect of command line usage would you like to see more posts about?

Wed, 19 Jun 2019 20:33:37 id

Next week I'll be providing training at a high school cybersecurity camp in Indianapolis. Still a few spots left: https://t.co/3euONL3YyV

Wed, 19 Jun 2019 18:59:15 id

cd /tmp || cd /var/run || cd /mnt || cd /root || cd / || echo "dude your server is really screwed up, I'm outta her… https://t.co/OstO3QecIX

Wed, 19 Jun 2019 18:52:05 id

Tip: To protect yourself from accidentally doing a terminal dump to your default printer (ie. pressing Ctrl+PrintSc… https://t.co/L3zLFi10fr

Tue, 18 Jun 2019 21:57:24 id

Do you have modelines turned on in vim? Check with :verbose set modeline? If it says 'nomodeline Last set from ...… https://t.co/tXyxRhEp7G

Mon, 17 Jun 2019 23:35:35 id

C="254,278" PP="30,362 212,44 350,287 272,287 212,187 70,430"; convert -size 500x500 xc:#101 -alpha on -stroke gre… https://t.co/LmFoRnBJBD

Mon, 17 Jun 2019 14:17:28 id

command ls # In bash, you can use 'command' to force executing a command as it is found in your path, ignoring func… https://t.co/2l6DNqiw21

Fri, 14 Jun 2019 18:17:46 id

Ctrl-B % # In tmux, this keystroke will split your current window vertically into two parts called panes. You can a… https://t.co/0PoXmJ2mAB

Thu, 13 Jun 2019 20:12:53 id

awk '$1==""' access.log | pee 'sed -n "1p;$p"' 'wc -l' # Search access.log for IP and p… https://t.co/ylgpFIfG9W

Wed, 12 Jun 2019 22:24:41 id

RT @orsinium: Draw bar chart of channels of Wi-Fi networks around: sudo iwlist wlp3s0 scan | grep (Channel | grep -P ' d+' -o | sort -g…

Wed, 12 Jun 2019 06:14:43 id

RT @ramix: HTTP script kiddie IP detection ordered by IP: awk '/" 404/{print $1}' /var/log/apache2/access.log | uniq -c | sort -n @climag

Wed, 12 Jun 2019 03:29:20 id

FYI: In the browser version of Twitter, you can use vi movement keys j and k to move up and down the list of tweets. Thanks @rolando

Tue, 11 Jun 2019 16:26:45 id

Loading... [waiting for a few minutes] Please insert disk 2 https://t.co/opctAlQC7P

Mon, 10 Jun 2019 22:53:57 id

Happy 30th Birthday /bin/bash! Thanks to its developers Brian Fox and Chet Ramey and all those who have contributed… https://t.co/XM1dtvTvAf

Sat, 08 Jun 2019 15:43:51 id

Did your parents meet on IRC?

Fri, 07 Jun 2019 22:17:00 id

play -M mic1.wav mic2.wav # Merge two audio files together and play them as one track.

Fri, 07 Jun 2019 21:35:48 id

Were/are your parents a regular user of *nix command line shells such as bash, zsh, sh, ksh, fish, pdksh, etc. ?

Fri, 07 Jun 2019 21:28:15 id

Where/are your parents regular *nix users?

Fri, 07 Jun 2019 20:58:18 id

last -p "2019-06-04 01:31:00" # A newer option of the last command allows you to print the users who were logged in… https://t.co/jjrP3h3Gld

Fri, 07 Jun 2019 00:19:14 id

[ENTER]~. # This sequence will close an OpenSSH session from the client side (same as killing the ssh client proces… https://t.co/ItHR5a8r31

Thu, 06 Jun 2019 22:23:19 id

while pidof dd ; do sleep 1; done; date # Don't watch the clock yourself, run date after the last dd command is done.

Thu, 06 Jun 2019 21:39:20 id

cal -3 # Show a 3 month view (before, current, after) in cal. https://t.co/uDtxieiYsU

Thu, 06 Jun 2019 18:10:12 id

Know a high school student looking for a great summer camp? Try to this cybersecurity camp in Indianapolis June 25-… https://t.co/2Bwf4PUAlh

Thu, 06 Jun 2019 17:56:46 id

convert -size 192x108 xc:black blackthumbnail.png # Help your #Youtube videos standout in the crowd with these blac… https://t.co/jkflo9CjR8

Wed, 05 Jun 2019 16:44:16 id

echo $[RANDOM%9+1] > /dev/udp/lights.climagic.org/45444 # Send a random number to change the corresponding light on… https://t.co/54CF9gBXhF

Tue, 04 Jun 2019 18:51:09 id

Rīga ... Rīdzinieki vispār nav nekādi cilvēki.