fileutils — 250 creative utilities for Termux and Linux
250 small, sharp command-line utilities: file organization, text tools,
system and network monitors, disk tools, archives and converters,
Termux/Android helpers, converters and generators, dev helpers, and
a few just for fun. Every utility is a real working tool with a
--help and a --selftest; nothing is a stub.
Build and test
make # compile the C/C++ utilities into bin/
tests/run_all.sh # build, then run every --help and --selftest
The test runner builds first, then runs all 250 smoke tests in parallel
(up to 8 concurrent, & + wait) with a 60 s timeout each, and reports
pass/fail per utility. It exits 0 only if the build and every test pass.
Layout
bin/— the utilities (Python/bash scripts live here; C/C++ binaries are built here bymakeand are git-ignored — see.gitignore)src/— C/C++ sources, one per compiled utilitytests/run_all.sh— the master test runnerIDEAS.md— the de-duplicated idea list (250 entries)
Languages
- C: 53
- Python: 172
- bash: 25
C/C++ is used where it fits (performance tools, monitors, system tools);
Python and bash where they fit better (glue, text processing, Termux
wrappers). Everything is standard library / coreutils / POSIX only —
no exotic dependencies, no GUI, Termux-compatible (plain cc/c++,
no ncurses, no Linux-only calls Android lacks).
Termux
The tx* utilities wrap termux-api commands. Each one checks for its
command and prints a clear message when absent instead of crashing, so
they degrade gracefully on plain Linux (with a Linux fallback where one
exists, e.g. txstorage falls back to df).
Slice A — File organization & dedup (25)
| # | Name | Language | Description |
|---|---|---|---|
| 001 | dustack |
Python | show which subdirectories grew most since the last snapshot (growth tracker, not just du) |
| 002 | dupfind |
C | find duplicate files by content hash, with a keep-newest/largest policy and a dry-run plan |
| 003 | namefix |
Python | rename files to a safe portable scheme (strip weird chars, optional lowercase) with an undo log |
| 004 | exifsort |
Python | sort photos into YYYY/MM folders by EXIF/date, dry-run first |
| 005 | emptyhunt |
Python | find empty directories deepest-first, report and optionally remove |
| 006 | flatpack |
Python | flatten a nested tree into one directory, resolving name clashes with suffixes |
| 007 | splitjoin |
C | split a file into N MB chunks and rejoin from a manifest with checksums |
| 008 | bigfind |
C | top-N largest files with age, type and parent-dir context |
| 009 | oldfiles |
Python | files untouched for X days grouped by directory, with size totals and an archive plan |
| 010 | renumber |
Python | rename a set of files to a sequential numbered scheme, preserving extensions, with preview |
| 011 | casefix |
Python | fix filename case collisions (Foo.txt vs foo.txt) for case-insensitive filesystems |
| 012 | extfix |
Python | detect a file's real type by magic bytes and fix a wrong extension |
| 013 | dirwatch |
Python | snapshot a directory tree (names+sizes+hashes) and later diff it to show exactly what changed |
| 014 | treeclean |
Python | remove common junk (thumbs.db, .DS_Store, *~, pycache) with a preview and count |
| 015 | sortbyage |
Python | move files into folders by age buckets (today / this week / this month / older) |
| 016 | hashmanifest |
C | create a sha256 manifest of a tree; verify it later |
| 017 | fileage |
Python | a file's age in human terms plus its birth time when the filesystem reports one |
| 018 | nestcount |
Python | count files by depth level in a tree (how deep is the mess?) |
| 019 | similar |
Python | find near-duplicate filenames (fuzzy match) that may be duplicates under different names |
| 020 | archage |
Python | find archives older than X days and report their compression ratios |
| 021 | copysafe |
Python | copy a tree with post-copy hash verification and resume on interruption |
| 022 | moveplan |
Python | dry-run planner: given move rules, show what would move where, then apply |
| 023 | linkcheck |
Python | find broken symlinks in a tree, with their targets |
| 024 | hardlink |
Python | find files with multiple hard links and report the link groups |
| 025 | lostfound |
Python | digital-hoarding report: files untouched 2+ years and over 100 MB |
Slice B — File content & text (25)
| # | Name | Language | Description |
|---|---|---|---|
| 026 | wordfreq |
Python | word frequency histogram with stopword filtering and a top-N bar chart |
| 027 | linecount |
C | lines/words/chars per file in a tree, with a summary table and largest-file highlight |
| 028 | diffwords |
Python | word-level diff of two text files (not line-level) |
| 029 | csvpeek |
Python | preview a CSV: columns, inferred types, row count, nulls, sample rows |
| 030 | jsonpeek |
Python | summarize JSON structure: keys, types, depth, size, sample values |
| 031 | logtail |
Python | tail a log with colorized levels and a lines-per-second rate meter |
| 032 | textclean |
Python | normalize text: trim trailing whitespace, fix line endings, collapse blanks, ensure final newline |
| 033 | searchrep |
Python | search/replace across a tree with preview, backups, and a change count |
| 034 | uniqcount |
C | count unique lines with frequencies, sorted |
| 035 | csvsum |
Python | sum/average/min/max a numeric CSV column, optionally grouped by another column |
| 036 | csvstat |
Python | per-column CSV statistics: distinct values, nulls, min/max |
| 037 | xmlpeek |
Python | summarize an XML file: tag counts, depth, attributes |
| 038 | lineend |
Python | detect and convert line endings (CRLF/LF/CR) with a report |
| 039 | encfix |
Python | detect and convert text encodings (UTF-8/16, latin-1) with a report |
| 040 | badlines |
Python | find overlong lines, trailing whitespace, and tabs — a lint for text files |
| 041 | headtail |
Python | show the first and last N lines of a file together (context sandwich) |
| 042 | randline |
Python | pick N random lines from a file |
| 043 | sortuniq |
Python | sort and dedupe a file in place, with a backup |
| 044 | csvjoin |
Python | join two CSVs on a key column |
| 045 | jsongrep |
Python | grep inside JSON values by key path |
| 046 | loghist |
Python | histogram of log events by hour, parsed from timestamps |
| 047 | textstat |
Python | readability stats: sentences, average word length, estimated reading time |
| 048 | hexpeek |
C | hexdump with ASCII and highlighting of printable runs |
| 049 | tailfollow |
Python | follow a file and show only lines matching a pattern, with running counts |
| 050 | diffside |
Python | side-by-side diff of two files in the terminal, with color |
Slice C — System monitoring (25)
| # | Name | Language | Description |
|---|---|---|---|
| 051 | cpugraph |
C | live ASCII CPU usage graph per core, read from /proc/stat, with refresh |
| 052 | memtop |
C | top memory users with a bar chart, snapshot mode, sorted by RSS |
| 053 | proctree |
C | process tree with CPU and memory per branch, collapsed by user |
| 054 | loadhist |
C | record load average over time into a log and show a sparkline history |
| 055 | swapwatch |
C | which processes use swap, how much, and the trend since last check |
| 056 | zombiefind |
C | find zombie processes and report their parents |
| 057 | fdleak |
C | processes with the most open file descriptors, with growth since last check |
| 058 | threadcount |
C | processes with the most threads, top-N |
| 059 | bootlog |
C | boot time, uptime, and load since boot in one line |
| 060 | cputemp |
C | CPU temperature from /sys with a tiny history graph (graceful message if absent) |
| 061 | fanwatch |
C | fan speeds from /sys/hwmon when present, graceful message otherwise |
| 062 | prochist |
C | record one process's CPU/mem over time (sampled) and plot it after it exits |
| 063 | nicewatch |
C | processes with unusual nice/priority values |
| 064 | oomscore |
C | top processes by OOM score — who the kernel would kill first |
| 065 | memfrag |
C | memory fragmentation estimate from /proc/buddyinfo |
| 066 | pressure |
C | PSI (pressure stall information) reader with a human summary |
| 067 | schedtop |
C | which processes are waiting on CPU (run queue) right now |
| 068 | cpufreq |
C | current CPU frequency per core, with min/max |
| 069 | sysnap |
C | one-shot system snapshot: load, memory, top processes, disk, network in one report |
| 070 | watchdog |
C | watch a process and report (and optionally restart) when it dies or exceeds limits |
| 071 | prockill |
C | interactive kill by pattern with a dry-run preview first |
| 072 | memmap |
C | one process's memory map summary (heap, stack, libraries) in human sizes |
| 073 | iowait |
C | processes with high I/O wait, from /proc/stat and /proc/*/io |
| 074 | topdisk |
C | processes doing the most disk I/O right now (reads and writes) |
| 075 | kernellog |
C | tail the kernel log with severity colors and a filter |
Slice D — Network monitoring (25)
| # | Name | Language | Description |
|---|---|---|---|
| 076 | netgraph |
C | live ASCII traffic graph per interface, from /proc/net/dev, with refresh |
| 077 | nettop |
C | per-process network usage, best-effort mapping from sockets to processes |
| 078 | portscan |
C | which local ports are listening and what owns them |
| 079 | portwatch |
Python | watch a port and report when it opens or closes |
| 080 | dnstime |
Python | measure DNS resolution time for a list of hosts |
| 081 | pingraph |
Python | ping a host and draw a latency graph over time |
| 082 | conntrack |
C | count active TCP connections by state and by remote host |
| 083 | bandwidth |
C | total bytes in/out per interface since boot, with current rates |
| 084 | socklist |
C | list sockets with process, state, and remote endpoint |
| 085 | wifisignal |
Python | Wi-Fi signal strength from /proc/net/wireless or iw, with fallback |
| 086 | ipinfo |
Python | all interfaces, IPs, MTU, and gateway in one table |
| 087 | latency |
Python | measure latency to several hosts and rank them |
| 088 | nettrace |
Python | trace the route to a host with per-hop latency (ping TTL method) |
| 089 | portfree |
Python | find the first free port in a range |
| 090 | connlog |
Python | log new connections over time (poll /proc/net/tcp) and report new/closed |
| 091 | dnsleak |
Python | check which DNS servers are actually used (resolv.conf plus live tests) |
| 092 | netusage |
Python | per-interface usage by hour, from snapshot deltas stored in ~/.cache |
| 093 | sshtest |
Python | test SSH connectivity to a host with timing and a banner grab |
| 094 | httpcode |
Python | fetch a URL and report status, time, size, and redirect chain |
| 095 | certcheck |
Python | a site's TLS certificate expiry date and issuer |
| 096 | netblock |
C | which processes have the most sockets open |
| 097 | multicast |
Python | list multicast group memberships |
| 098 | arpwatch |
Python | ARP table entries with MAC, IP, and interface |
| 099 | netdown |
Python | diagnose network health: gateway, DNS, and internet, with a verdict |
| 100 | trafficlog |
C | record interface byte counts every minute into a CSV and show daily totals |
Slice E — Disk & storage (25)
| # | Name | Language | Description |
|---|---|---|---|
| 101 | diskgraph |
C | ASCII bar chart of disk usage by mount point |
| 102 | bigdirs |
C | largest directories in a tree, top-N, with a tree view |
| 103 | inodehunt |
C | directories consuming the most inodes (many small files) |
| 104 | diskfill |
Python | estimate days until a disk fills, from recent growth snapshots |
| 105 | fscheck |
Python | filesystem type, mount options, and free space per mount in one table |
| 106 | trimcheck |
Python | whether TRIM is enabled/supported, from /sys, with graceful fallback |
| 107 | diskage |
C | files by age on a disk — what is old and big |
| 108 | mountlist |
Python | all mounts with type, size, free space, and ro/rw flag |
| 109 | diskbench |
Python | simple write/read speed test on a directory (temp file, cleaned up) |
| 110 | spacereport |
Python | full disk-space report: mounts, top directories, top files, growth |
| 111 | cacheclean |
Python | clear user caches safely (~/.cache, pip, npm) with sizes reclaimed |
| 112 | snapdiff |
Python | compare two disk-usage snapshots and show what grew |
| 113 | filetypes |
C | disk usage by file extension in a tree (which types eat the disk) |
| 114 | emptybig |
C | find large files that are mostly zeros (sparse files) |
| 115 | disktemp |
Python | disk temperature from SMART if smartctl is present, else /sys, else a clear message |
| 116 | raidcheck |
Python | MD RAID status from /proc/mdstat when present |
| 117 | diskio |
C | per-device I/O stats from /proc/diskstats with rates |
| 118 | mountwatch |
Python | watch for mount/unmount events by polling /proc/mounts |
| 119 | quota |
Python | disk quota usage when set, otherwise free space |
| 120 | logrotate |
Python | tiny log rotator: compress old logs, keep N generations |
| 121 | backupcheck |
Python | verify a backup tree matches its source by hash, report missing/changed |
| 122 | synccheck |
Python | dry-run rsync-style diff between two directories (what would change) |
| 123 | diskalarm |
Python | alert when a mount crosses a usage threshold, with a one-line report |
| 124 | fatfree |
C | find files larger than X in a tree and suggest moving them |
| 125 | treemap |
C | ASCII treemap of disk usage by directory (nested bars) |
Slice F — Archives, conversion, checksums, metadata (25)
| # | Name | Language | Description |
|---|---|---|---|
| 126 | zipls |
Python | list zip archive contents with sizes, without extracting |
| 127 | tarpeek |
Python | list tar/tar.gz contents with a summary |
| 128 | archratio |
Python | compression ratio of the archives in a directory |
| 129 | zipcheck |
Python | verify archive integrity and report the broken ones |
| 130 | archconv |
Python | convert an archive between zip and tar.gz, with verification |
| 131 | hashfile |
C | hash a file with several algorithms at once (md5/sha1/sha256) in one pass |
| 132 | hashdir |
C | hash a whole tree and write a manifest |
| 133 | verifyhash |
Python | verify files against a checksum file (sha256sum format) |
| 134 | metaread |
Python | file metadata in one view: type, size, times, permissions, xattrs |
| 135 | metacopy |
Python | copy timestamps and permissions from one file to another |
| 136 | touchdate |
Python | set a file's mtime to a given date, or copy it from another file |
| 137 | permfix |
Python | normalize permissions (files 644, dirs 755) with a preview and an undo list |
| 138 | ownfix |
Python | report files in a tree not owned by the current user |
| 139 | execfix |
Python | find scripts without the executable bit, or with it but no shebang |
| 140 | csv2json |
Python | convert a flat CSV file to JSON |
| 141 | json2csv |
Python | convert a flat JSON array to CSV |
| 142 | json2yaml |
Python | convert JSON to YAML (small built-in emitter, stdlib only) |
| 143 | xml2json |
Python | convert simple XML to JSON |
| 144 | base64file |
Python | base64 encode/decode files, with a check round-trip |
| 145 | hexfile |
Python | hex encode/decode files |
| 146 | urlfile |
Python | URL-encode/decode a file or a string |
| 147 | bomfix |
Python | detect, strip, or add a BOM in text files |
| 148 | charset |
Python | detect a file's encoding (UTF-8/16/32, latin-1) with a confidence note |
| 149 | bin2txt |
Python | encode a binary file as text (base64/hex) with a decode header |
| 150 | txt2bin |
Python | decode a bin2txt file back to binary |
Slice G — Termux/Android (25)
| # | Name | Language | Description |
|---|---|---|---|
| 151 | txbattery |
bash | battery status (termux-battery-status, /sys fallback) |
| 152 | txclip |
bash | clipboard get/set (termux-clipboard-get/set) |
| 153 | txnotify |
bash | send an Android notification (termux-notification) |
| 154 | txstorage |
bash | storage info (termux-storage, df fallback) |
| 155 | txvibrate |
bash | vibrate the device (termux-vibrate) |
| 156 | txtorch |
bash | torch on/off (termux-torch) |
| 157 | txwifi |
bash | Wi-Fi connection info (termux-wifi-connectioninfo) |
| 158 | txwallpaper |
bash | set the wallpaper from an image (termux-wallpaper) |
| 159 | txcontact |
bash | look up a contact by name (termux-contact-list) |
| 160 | txsms |
bash | list recent SMS messages with a count (termux-sms-list) |
| 161 | txcall |
bash | list recent calls (termux-call-log) |
| 162 | txlocation |
bash | current location with a timeout (termux-location) |
| 163 | txshare |
bash | share a file via the Android share sheet (termux-share) |
| 164 | txopen |
bash | open a file with its default app (termux-open) |
| 165 | txsensors |
bash | list sensors and their current values (termux-sensor) |
| 166 | txscan |
bash | trigger a media scan of a file or directory (termux-media-scan) |
| 167 | txbrightness |
bash | set screen brightness (termux-brightness) |
| 168 | txvolume |
bash | show and set volume levels (termux-volume) |
| 169 | txtts |
bash | speak text out loud (termux-tts-speak) |
| 170 | txdialog |
bash | show a dialog and return the choice (termux-dialog) |
| 171 | txwake |
bash | acquire/release a wake lock (termux-wake-lock/unlock) |
| 172 | txusb |
bash | list USB devices (termux-usb-list) |
| 173 | txtelephony |
bash | telephony and device info (termux-telephony-deviceinfo) |
| 174 | txdownload |
bash | download a file into Downloads (termux-download) |
| 175 | txtermux |
bash | Termux environment report: version, storage, API availability, health check |
Slice H — Time, dates, units, converters, generators (25)
| # | Name | Language | Description |
|---|---|---|---|
| 176 | datecalc |
Python | date arithmetic: add/subtract days, difference between dates, weekday |
| 177 | epoch |
Python | convert between epoch seconds and human dates, both ways |
| 178 | countdown |
Python | countdown to a date with a live display |
| 179 | stopwatch |
Python | terminal stopwatch with laps |
| 180 | pomodoro |
Python | pomodoro timer with work/break cycles and a session log |
| 181 | unitconv |
Python | convert units (length, weight, temperature, data) with a table |
| 182 | dataconv |
Python | convert data sizes (B/KB/MB/GB, bits/bytes, MiB vs MB) |
| 183 | tempconv |
Python | temperature converter (C/F/K) with a conversion table |
| 184 | passgen |
Python | generate passwords (length, symbols, word mode) |
| 185 | dice |
Python | roll dice with notation (3d6+2) and a roll history |
| 186 | randpick |
Python | pick a random item from a list or a file |
| 187 | randnum |
Python | random numbers in a range, with an optional seed |
| 188 | uuidgen |
Python | generate UUIDs (v4) and short ids |
| 189 | colorpick |
Python | pick and convert colors (hex/rgb/hsl) and show a terminal swatch |
| 190 | morse |
Python | text to Morse code and back |
| 191 | braille |
Python | text to Braille unicode and back |
| 192 | baseconv |
Python | convert numbers between bases (2/8/10/16/36) |
| 193 | romannum |
Python | convert to and from Roman numerals |
| 194 | timesheet |
Python | log time spent on tasks, with a daily summary |
| 195 | agecalc |
Python | age from a birthdate: years, days lived, next birthday |
| 196 | workdays |
Python | count working days between two dates (weekends excluded) |
| 197 | tzconv |
Python | convert a time between time zones (built-in zone table, system tzdata when present) |
| 198 | speedconv |
Python | speed converter (km/h, mph, m/s, knots) |
| 199 | currconv |
Python | currency converter with an editable offline rate file |
| 200 | quote |
Python | quote of the day (built-in list, deterministic by date) |
Slice I — Dev & shell helpers (25)
| # | Name | Language | Description |
|---|---|---|---|
| 201 | gitstat |
Python | one-page git repo summary: branch, status counts, recent commits, stashes |
| 202 | gitclean |
Python | find and remove stale git branches (merged, or with no upstream) with a preview |
| 203 | gitlog |
Python | pretty log with a graph and per-commit file stats, filtered by author/date |
| 204 | cronlist |
Python | list cron jobs with a human-readable explanation of each schedule |
| 205 | croncheck |
Python | validate a cron expression and show the next run times |
| 206 | sshkeys |
Python | list SSH keys, their fingerprints, and which are loaded in the agent |
| 207 | sshhost |
Python | known-hosts report with fingerprints |
| 208 | tmuxls |
Python | tmux/screen sessions with a summary, graceful fallback when absent |
| 209 | tmuxsave |
Python | save and restore a tmux session layout (best effort) |
| 210 | pkglist |
Python | list installed packages (apt/dpkg or pacman) with sizes, top-N |
| 211 | pkgsearch |
Python | search installed packages by name or description |
| 212 | envdiff |
Python | compare environment variables between two shells, or a file and the current env |
| 213 | pathclean |
Python | show PATH entries, flag duplicates and missing directories, print a cleaned PATH |
| 214 | aliaslist |
Python | list shell aliases and functions with their definitions |
| 215 | histstat |
C | shell history statistics: most-used commands, usage by hour |
| 216 | scriptcheck |
Python | syntax-check all shell scripts in a directory (bash -n) and report |
| 217 | pycheck |
Python | syntax-check Python files (py_compile) and report |
| 218 | todo |
Python | find TODO/FIXME/XXX comments in a tree, with counts by file |
| 219 | codelines |
C | count code lines by language in a tree |
| 220 | gitdiffstat |
Python | diff stats between two refs with a per-file table |
| 221 | branchage |
Python | age of git branches, sorted, with last commit |
| 222 | stashlist |
Python | list stashes with a summary of their contents |
| 223 | repocheck |
Python | health check for a git repo: uncommitted, untracked, ahead/behind, large files |
| 224 | maketool |
Python | scaffold a new utility: template file plus a test stub |
| 225 | benchcmd |
Python | benchmark a command's runtime over N runs (average, min, max) |
Slice J — Fun, creative, novel concepts (25)
| # | Name | Language | Description |
|---|---|---|---|
| 226 | banner |
Python | ASCII banner text with several built-in fonts (no figlet dependency) |
| 227 | fortune |
Python | random fortune with categories (built-in list) |
| 228 | motd |
Python | generate a message of the day from live system stats plus a quote |
| 229 | typing |
Python | typing speed test in the terminal |
| 230 | quiz |
Python | tiny quiz game with built-in questions and a score |
| 231 | hangman |
Python | hangman game in the terminal |
| 232 | memory |
Python | memory matching game in the terminal |
| 233 | maze |
Python | generate a random ASCII maze |
| 234 | life |
Python | Conway's Game of Life in the terminal for a few generations |
| 235 | starfield |
Python | short animated starfield (frame-limited, so it always exits) |
| 236 | clock |
Python | big ASCII clock, live, with a duration limit |
| 237 | calendar |
Python | month calendar with today highlighted and events read from a file |
| 238 | moonphase |
Python | moon phase calculator from the date (algorithmic, no network) |
| 239 | sunrise |
Python | sunrise/sunset calculator for a given latitude/longitude (algorithmic) |
| 240 | passphrase |
Python | generate a passphrase from a built-in wordlist |
| 241 | anagram |
Python | find anagrams of a word from a built-in wordlist |
| 242 | palindrome |
Python | check palindromes and find the longest palindromic substring |
| 243 | lorem |
Python | generate lorem ipsum text (N paragraphs) |
| 244 | fakeuser |
Python | generate a fake user profile (name, email, address) for testing |
| 245 | fakelog |
Python | generate fake log lines for testing log tools |
| 246 | fakedata |
Python | generate fake CSV data (names, ages, cities) for testing |
| 247 | timer |
Python | simple countdown timer with a message at the end |
| 248 | alarm |
Python | set an alarm (sleep, then a beep and a message) |
| 249 | focus |
Python | focus session tracker: start/stop, log, daily total |
| 250 | namegen |
Python | generate creative names for projects, pets, or bands from combinable word lists |