Home Blog Gallery

alloyed's posts (RSS feed)

Shell Addendum A, file sizes

published Sat May 02 2026 23:29:37 GMT-0400 (Eastern Daylight Time)

this is a micro-sidebar-thingo, because i ran out of disk space on my desktop! D: from all the music from bandcamp I was legally downloading, and all. I'll instead use screenshots from my VPS machine. no worries.

anyways, some little tricks:

to check your partitions (same as opening 'This PC') on windows

kit@alloyed1 ~> df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           390M  1.2M  389M   1% /run
efivarfs        256K   60K  192K  24% /sys/firmware/efi/efivars
/dev/vda2        24G   15G  7.3G  68% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/vda1       1.1G  6.2M  1.1G   1% /boot/efi
tmpfs           390M   12K  390M   1% /run/user/1001

"-h" stands for "human readable numbers", and many commands support it, just replaces raw lists of bytes with "1.1G" (meaning 1.1 gigabytes) and so on. let's drill into the /

kit@alloyed1 ~> sudo du -had 1 / | sort -h
du: cannot access '/proc/412627/task/412627/fd/4': No such file or directory
du: cannot access '/proc/412627/task/412627/fdinfo/4': No such file or directory
du: cannot access '/proc/412627/fd/3': No such file or directory
du: cannot access '/proc/412627/fdinfo/3': No such file or directory
0	/bin
0	/dev
0	/lib
0	/lib64
0	/proc
0	/sbin
0	/sys
4.0K	/bin.usr-is-merged
4.0K	/cdrom
4.0K	/lib.usr-is-merged
4.0K	/media
4.0K	/mnt
4.0K	/opt
4.0K	/sbin.usr-is-merged
4.0K	/srv
8.0K	/snap
16K	/lost+found
84K	/root
100K	/tmp
1.2M	/run
17M	/etc
207M	/boot
1.3G	/var
3.9G	/swap.img
4.8G	/home
4.9G	/usr
15G	/

-h is human-readable again. -a means "list files and directories". -d 1 means "only recurse 1 level deep". different numbers produce more detailed reports! but this is fine for me.

| sort -h pushes the largest numbers to the bottom, taking into account the human-readable format, which is handy. (I know I haven't explained | yet! when I do, and if i remember to, I'll link an explanation here).

From this we know our 15G of used space is about equally split between /usr(where system packages are installed), /home (where your personal files are stored), and /swap.img , which is a magic file that acts as backup RAM if you run out. I know I don't need to do anything here, but if i did care I'd probably look into each folder individually to check.

i know i accidentally downloaded the same thing twice on my desktop, so I'll introduce a custom tool to do something about this:

sudo apt install fdupes

(you can also do this with a shell script. but. the performance benefits of a dedicated tool are nice.)

kit@alloyed1 ~> fdupes -cr --size shared
27868 bytes each:
shared/2024/cohost live!.png
shared/2024/cohost_live.png

3473068 bytes each:
shared/2024/kit export packed.fbx
shared/2024/kit_export_packed.fbx

4304207 bytes each:
shared/2024/Look Into The Heart Now [vXoiyzy3Vys].mp3
shared/2024/crunch_lithn.mp3

hehe oops. ok

kyle@alloyed1 ~> fdupes -cr --size --delete shared

screenshot of the fdupes TUI for interactively picking which files to delete

(i should make a quick script to auto-explain the flags i use in these. maybe next time, lol)

#kit techtips #bash

Shell Lesson 01, Batch Processing

published Fri Mar 13 2026 05:20:51 GMT-0400 (Eastern Daylight Time)

This is the second lesson in a series! Previously, we did a basic intro on the terminal. Now, let's do something convenient with them: Batch Processing.

We're going to be messing a with a bunch of files at once in this section, which should scare you. What if we didn't mean what we wrote? For protection, always have backups, and if the files you're working on are small enough, consider making a copy of the entire folder in the known "good" state so you can easily swap them in, out and compare:

$ cp -r myfolder myfolder_backup

Example: File converting

I have a lot of random images on my computer. Some of them are even, (gasp) in .webp format!

$ echo *.webp
IMG_9532.webp  IMG_9571.webp

The * character is a wildcard, also known as a glob. it means "match any string of characters, including 0 characters". when combined with a suffix (.webp), this means "match any file that ends in .webp". I've looked at these (using xdg-open IMG_9532.webp, remember!), and they are smallish drawings, so I think converting them to png files makes sense.

I already have a package installed for this, ImageMagick. You could technically do this with a lot of programs, including things with full GUIs attached like the unfortunately named GNU Image Manipulation Program. but imagemagick has a nice cli so we'll stick with that.

$ magick IMG_9532.webp IMG_9532.png
$ ls -lh IMG_9532*
-rw

--- Read More ---

#kit techtips #bash

Shell Lesson 00, An Intro to the Terminal

published Wed Mar 04 2026 19:02:32 GMT-0500 (Eastern Standard Time)

i wonder how much appetite there is for “here’s how to do things that are normally tedious or inconvenient in a gui app using bash” type blogposts.cit does feel like half of the things people pretend AI is good at is actually just writing these kinds of micro scripts and people just don’t know that it’s possible and easy

Ok fine :) This is meant to be introductory! so I'm going to take things extra slow, and if there's anything you feel you don't understand, don't assume you're dumb! I may have misexplained (or underexplained) it.

--- Read More ---

#kit techtips #bash

Thinking too hard about patch points

published Sat Nov 22 2025 11:59:02 GMT-0500 (Eastern Standard Time)

So, in your normal analog modular synth, inputs and outputs communicate through "patch points". These are little jacks scattered throughout the system, and you connect a patch cable in between the two to combine them.

eurorack synth with 3.5mm cables

--- Read More ---

#modular synth

Links that Google Search let me down on

published Sun Sep 14 2025 22:35:06 GMT-0400 (Eastern Daylight Time)

this is a weird one: I'm just a little frustrated that a perfect, very well written blog post about the exact thing i was looking up took me multiple rewordings and paging through google results to find >:(

To Remedy this: A living document! every time this happens to me (and i remember) I'll add a link here for it. To be updated whenever that happens. I'll also include a little description for each, to make it clear why i like the link in question.

--- Read More ---

#enshittification

Pages: 1 2 3 4