Unix

Tag: Unix

47 posts
Inspecting Processes with ps
T
Today I Learned
til.desertthunder.dev

Inspecting Processes with ps

Process selection, custom output, state codes, and portability across Unix systems

·
Aug 10
·
Migrating from GNU stow to chezmoiMigrating from GNU stow to chezmoi
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Migrating from GNU stow to chezmoi

Why I swapped GNU stow's symlink farm for chezmoi: one command to bootstrap a Mac with Homebrew packages and macOS settings, a small daily sync loop, and agent skills shared between Claude Code and Codex.

·
Jun 11
·
Background jobs and inherited file descriptorsBackground jobs and inherited file descriptors
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Background jobs and inherited file descriptors

Why & backgrounds execution but doesn't stop output from flooding your terminal.

·
Mar 27
·
waving goodbye to windows - part 1waving goodbye to windows - part 1
griff icon
griff
griff.pckt.blog

waving goodbye to windows - part 1

Okay, so the title might be a little misleading. I waved goodbye to Windows in favor of Linux (obligatory "I use Arch, btw") some time ago. Given that my personal laptop's hardware was of the 2016 era, I just couldn't run Windows very well any longer. Not that I wanted to anyway. I opted for an Arch-based distribution called CachyOS, set it up once, and didn't fiddle with it at all. It worked great! But as the aging hardware continued to cause problems, it became apparent that it was time to mov...

·
Mar 12
·
I kind of like rebasingI kind of like rebasing
M
Mahib's Margins
mahibulhaque.me

I kind of like rebasing

Master git rebase for cleaner commit history. Learn interactive rebasing, squashing commits, and rebasing feature branches onto main with practical examples.

·
Jun 17 '25
·
Dynamic shell variablesDynamic shell variables
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Dynamic shell variables

Learn variable indirection in Bash with ${!var} syntax. Build context-aware configs, function dispatch, and dynamic variable name resolution.

·
Jan 10 '25
·
Running only a single instance of a processRunning only a single instance of a process
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Running only a single instance of a process

Prevent multiple script instances with file locking. Use flock in Bash, fcntl in Python, and syscall.Flock in Go for single-instance processes.

·
Dec 30 '24
·
SSH sagaSSH saga
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

SSH saga

Complete SSH setup guide: key pairs, authorized_keys, sshd_config, ssh_config, known_hosts, agent forwarding, and hardening for secure remote access.

·
Dec 16 '24
·
Discovering direnvDiscovering direnv
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Discovering direnv

Automate environment variables per directory with direnv. Load .envrc files on entry, unload on exit. Integrate with Python venv and uv workflow.

·
Oct 1 '24
·
Bash namerefs for dynamic variable referencingBash namerefs for dynamic variable referencing
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Bash namerefs for dynamic variable referencing

Master Bash namerefs with declare -n to create dynamic variable references. Build generic functions for arrays and associative arrays without eval.

·
Sep 19 '24
·
Shell redirection syntax soupShell redirection syntax soup
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Shell redirection syntax soup

Complete guide to Bash redirection. Master stdout, stderr, pipes, tee, file descriptors, and shorthand syntax with practical examples for every case.

·
Sep 11 '24
·
Beyond Ctrl-C: The dark corners of Unix signal handling
sunshowers icon
sunshowers
sunshowers.io

Beyond Ctrl-C: The dark corners of Unix signal handling

An introduction to signals: a written version of my talk at RustConf 2023.

·
Sep 2 '24
·
HTTP requests via /dev/tcpHTTP requests via /dev/tcp
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

HTTP requests via /dev/tcp

Make raw HTTP requests with Bash's /dev/tcp file descriptor. Build health check scripts without curl or wget using TCP socket connections.

·
Aug 7 '24
·
The *nix install commandThe *nix install command
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

The *nix install command

Replace mkdir, cp, and chmod with a single install command. Copy files, create directories, and set permissions in one step with GNU coreutils.

·
Jul 27 '24
·
Here-doc headacheHere-doc headache
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Here-doc headache

Avoid here-doc pitfalls when running remote commands via SSH. Learn variable expansion gotchas and simpler alternatives for deployment scripts.

·
Jul 18 '24
·
I kind of like rebasingI kind of like rebasing
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

I kind of like rebasing

Master git rebase for cleaner commit history. Learn interactive rebasing, squashing commits, and rebasing feature branches onto main with practical examples.

·
Jun 17 '24
·
sudo embrace
Tedium: The Dull Side of the Internet icon
Tedium: The Dull Side of the Internet
tedium.co/

sudo embrace

Microsoft’s decision to introduce sudo for Windows is strangely symbolic of how influential UNIX has been even on non-UNIX ecosystems.

·
Feb 8 '24
·
Pesky little scriptsPesky little scripts
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Pesky little scripts

Organize custom scripts with comma-prefixed naming. Improve tab completion and eliminate clutter by prefixing script names with special characters.

·
Oct 28 '23
·
Remembrance of computers past
frankhecker.com icon
frankhecker.com
frankhecker.com

Remembrance of computers past

I reminisce about the computers of my youth.

·
Oct 28 '23
·
Making Way For Wayland
Tedium: The Dull Side of the Internet icon
Tedium: The Dull Side of the Internet
tedium.co/

Making Way For Wayland

With recent moves made by prominent players, Wayland seems closer than ever to being the ultimate path for Linux users—but, let’s be honest, X11 will never truly die.

·
Oct 12 '23
·
Dotfile stewardship for the indolentDotfile stewardship for the indolent
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Dotfile stewardship for the indolent

Manage dotfiles across devices with GNU Stow. Symlink configuration files from git repo to home directory with simple, idempotent commands.

·
Sep 26 '23
·
Using DNS record to share text dataUsing DNS record to share text data
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Using DNS record to share text data

Share data via DNS TXT records using dig and base64 encoding. Learn limitations, security concerns, and practical use cases for DNS tunneling.

·
Jul 16 '23
·
Unix-style pipelining with Python's subprocess moduleUnix-style pipelining with Python's subprocess module
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Unix-style pipelining with Python's subprocess module

Build Unix-style command pipelines in Python using subprocess.run with stdout piping for efficient process chaining and output capture.

·
Jul 13 '23
·
Implementing a simple traceroute clone in PythonImplementing a simple traceroute clone in Python
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Implementing a simple traceroute clone in Python

Build a traceroute clone in Python using UDP and ICMP sockets to trace network packet routes and measure hop latency with TTL manipulation.

·
May 31 '23
·
Fixed-time job scheduling with UNIX 'at' commandFixed-time job scheduling with UNIX 'at' command
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Fixed-time job scheduling with UNIX 'at' command

Schedule one-time commands with UNIX at command. Learn job queuing, remote scheduling via HTTP API, and managing atd/atrun daemons.

·
May 13 '23
·
Associative arrays in BashAssociative arrays in Bash
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Associative arrays in Bash

Learn how to use associative arrays in Bash to create key-value pairs, mimic dictionaries, and manage complex data structures in shell scripts.

·
May 2 '23
·
Process substitution in BashProcess substitution in Bash
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Process substitution in Bash

Use process substitution <() to treat command output as files in Bash. Compare directories, process data, and avoid temporary files with this technique.

·
Apr 29 '23
·
Dynamic menu with select statement in BashDynamic menu with select statement in Bash
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Dynamic menu with select statement in Bash

Build interactive CLI menus with Bash select statement. Create user-friendly command-line tools with option selection and function dispatch.

·
Apr 28 '23
·
Simple terminal text formatting with tputSimple terminal text formatting with tput
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Simple terminal text formatting with tput

Format terminal output with tput instead of ANSI codes. Set colors, bold text, underlines, and backgrounds with simple commands in shell scripts.

·
Apr 22 '23
·
Tinkering with Unix domain socketsTinkering with Unix domain sockets
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Tinkering with Unix domain sockets

Build Unix domain socket servers and clients with Python and socat. Access Docker API via UDS, create HTTP servers, and optimize inter-process communication.

·
Mar 10 '23
·
Colon command in shell scriptsColon command in shell scripts
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Colon command in shell scripts

Use the colon : command as a no-op in Bash scripts for cleaner debug output with -x flag. Alternative to echo for section markers and comments.

·
Dec 22 '22
·
Auditing commit messages on GitHubAuditing commit messages on GitHub
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Auditing commit messages on GitHub

Automate commit message validation with GitHub Actions. Enforce refs and closes patterns to maintain clean Git history and link commits to issues.

·
Oct 5 '22
·
To quote or not to quoteTo quote or not to quote
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

To quote or not to quote

Master shell quoting rules: single vs double quotes, backticks vs $(). Learn when to quote variables to prevent spaces and special characters from breaking commands.

·
Oct 4 '22
·
Returning values from a shell functionReturning values from a shell function
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Returning values from a shell function

Understand how return values work in Bash functions. Learn exit codes, status evaluation patterns, and proper boolean returns with true/false commands.

·
Sep 24 '22
·
Distil git logs attached to a single fileDistil git logs attached to a single file
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Distil git logs attached to a single file

View git commit history for a single file with git log --follow. Learn to track multiple files with xargs and concatenate their commit logs.

·
Jun 20 '22
·
Health check a server with 'nohup $(cmd) &'Health check a server with 'nohup $(cmd) &'
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Health check a server with 'nohup $(cmd) &'

Run background health checks in CI with nohup and ampersand. Test server readiness with retry loops and automatic cleanup on success or failure.

·
Apr 17 '22
·
Don't add extensions to shell executablesDon't add extensions to shell executables
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Don't add extensions to shell executables

Why executable scripts shouldn't have extensions. Learn GitHub's scripts-to-rule-them-all pattern for language-agnostic project automation.

·
Nov 22 '21
·
Use 'command -v' over 'which' to find a program's executableUse 'command -v' over 'which' to find a program's executable
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Use 'command -v' over 'which' to find a program's executable

Replace which with command -v for POSIX-compliant executable lookup. Learn why command -v is the portable alternative for finding program paths.

·
Nov 15 '21
·
Use curly braces while pasting shell commandsUse curly braces while pasting shell commands
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Use curly braces while pasting shell commands

Prevent shell commands from executing immediately when pasting. Use curly braces to safely paste multi-line commands with hidden newline characters.

·
Nov 7 '21
·
Use strict mode while running bash scriptsUse strict mode while running bash scripts
Redowan's Reflections icon
Redowan's Reflections
rednafi.com

Use strict mode while running bash scripts

Enable Bash strict mode with set -euo pipefail to catch errors early. Exit on failures, treat unset variables as errors, and handle pipeline failures properly.

·
Nov 7 '21
·
Pipelines and your Unix toolbox
T
Thought Eddies
danielcorin.com

Pipelines and your Unix toolbox

·
May 28 '19
·
Go and UNIX files
T
Thought Eddies
danielcorin.com

Go and UNIX files

·
Jan 5 '19
·
The UNIX operating system
K
kshlm's blog
kshlm.in

The UNIX operating system

·
Jun 2 '14
·
ii - A True Minimalist's IRC Client
P
Philihp Busby
philihp.com

ii - A True Minimalist's IRC Client

·
Sep 15 '10
·
Amazon ya no está "en las nubes"
W
Walking away from Omelas...

Amazon ya no está "en las nubes"

Pues eso, que desde hoy, Amazon proporciona almacenamiento persistente a sus instancias de “Elastic Computing Cloud” (EC2).Y no solo eso, que podría parecer facil dado que ya tienen su “Simple Storage Server” (S3, el guardian de mi musica por ahora), sino que añaden caracteristicas interesantísimas

·
Aug 21 '08
·
mod_rewrite Voodoo
W
Walking away from Omelas...

mod_rewrite Voodoo

Vale, post eminentemente técnico, no se me pierdan.Resulta que estoy trabajando contra un Apache ‘restringido’, y no acepta ProxyPass/ProxyPassReverse.Y claro, cuando uno quiere presentar varios servidores en un único front… esa es la opción más habitual… al menos hasta donde yo se.Así que, anulada

·
Aug 21 '08
·
Las cosas que me gustan de Unix, **revisited**
W
Walking away from Omelas...

Las cosas que me gustan de Unix, **revisited**

Jajajajaja… haciendo una nueva imagen de EC2 para un proyecto me acabo de encontrar con este mensaje…[…] /mnt/gailenora /mnt/img-mnt1+0 records in1+0 records out1048576 bytes (1.0 MB) copied, 0.00264 s, 397 MB/smke2fs 1.40.4 (31-Dec-2007)NOTE: rsync with preservation of extended file

·
Aug 13 '08
·