Command Line Magic
climagic.bsky.social
Command Line Magic
@climagic.bsky.social
Cool Unix/Linux Command Line tricks you can use in $CHAR_LIMIT characters or less. Here mostly to inspire. https://www.climagic.org/
Is the post-mis-information age going to be any better?
October 5, 2025 at 6:39 PM
Bad UX design demonstrated in one form field.
September 3, 2025 at 9:29 PM
It's funny how humans complain about AI hallucinations when humans make shit up all the time.
July 25, 2025 at 5:48 PM
Vim users: If you'd like to highlight the whole line the cursor is on:

:set cursorline

I just used that when examining package output from dpkg -l so that I could easily see which description matched each package.
July 25, 2025 at 11:59 AM
Being able to do stuff like this is what makes the command line pretty special:

ssh 192.168.0.15 'sudo dd if=/dev/sda bs=1M status=progress' > backup-old-drive.img
May 18, 2025 at 1:16 AM
All I wanted to do was copy a file.
April 18, 2025 at 2:40 PM
The Daemon In The Castle
April 1, 2025 at 9:10 PM
This Minecraft MMO server has "command line terminals" in it. Non-functional, but I approve.
play.stardew.net
March 15, 2025 at 2:44 AM
Couldn't help but notice the lunar eclipse tonight at least in eastern time zone is π (3.14159) as in March 14th in the 159th minute of the day (2:39am)
March 13, 2025 at 8:50 PM
I tried to do standup comedy once.
But, by the time I finished editing the joke,
the audience was already walking out and
my computer was all over the floor.
March 13, 2025 at 7:37 PM
I had forgotten how unixy the Amiga shell is.
March 13, 2025 at 1:20 AM
If you mistakenly use curl like nc like the following:

curl www.example.com 80

the port number ends up being treated as an IP address of the form 0.0.0.N. So if you see traffic destined to 0.0.0.80, 0.0.0.22, etc. on your network, it's probably someone messing up their curl command.
February 25, 2025 at 5:54 PM
Today I learned that not only Libreoffice didn't have a unique() function until recently, but apparently Excel didn't even have it until 2018. This is like 30 years later than you'd expect spreadsheets to implement it. Unix had it in 1982 as Brian Kernighan shows here www.youtube.com/watch?v=tc4R...
AT&T Archives: The UNIX Operating System
YouTube video by AT&T Tech Channel
www.youtube.com
January 27, 2025 at 4:22 PM
If you're concerned about how your use of wildcards and brace expansion will be interpreted by the shell and passed to the program, you can usually replace the command name with echo first to get a list of the args that will be generated:

echo Photos/\[Conference\]-*.{jpg,mp4}
January 24, 2025 at 2:34 PM
If you're not sure what type of data is in a gzip, bzip2, or xz format file, one way to find out is to pipe its decompressed output into the 'file' command:

gzip -dc unknown-gzip-file | file -

It will tell you the type of file data that is inside. The -dc options also work with bzip2 and xz
January 23, 2025 at 2:38 PM
I ran this yesterday to solve a CTF. It should have been called a WTF.
xxd -r data.txt | gzip -cd | bzip2 -cd | gzip -cd | tar x -O | tar x -O | bzip2 -cd | tar x -O | gzip -cd
January 18, 2025 at 12:22 PM
Every Unix is sacred, every Unix is best.
Every Unix is different, when you run ps.
January 15, 2025 at 4:19 PM
printf "\e[34;1m . .\n( \\__/ )\n \\ /\n (_/\_)\n\e[0m"
December 12, 2024 at 3:00 PM