A transcript-ingestion job reports that one file disappeared and another could not be opened. The file is there: its name contains a newline. A script that treats each line of find output as one path has split one filename into two records. This matters when an AI developer tool walks user-uploaded transcripts, evaluation fixtures, or generated audio assets whose names came from outside the script.
On Unix filesystems, a filename may contain a newline, space, quote, or backslash. It cannot contain a NUL byte or a slash. GNU find normally prints a newline after each match. GNU xargs normally parses blanks and newlines as separators and also gives quotes and backslashes special treatment. So find ... -print | xargs ... does not preserve arbitrary names, even if the shell command itself looks properly quoted. The GNU find manual calls out this failure in its examples, and the GNU xargs manual explains its default parser.
Give the producer and consumer the same delimiter:
find ./transcripts -type f -name '*.txt' -print0 |
xargs -0 -r sha256sum --
-print0 terminates each complete path with NUL. -0 makes xargs read that delimiter and treat embedded whitespace, quotes, and backslashes literally. The ./ prefix keeps discovered relative paths from beginning with an option-looking dash, while -- marks the end of options for the command shown. GNU xargs -r skips the command when no paths match. xargs may still invoke the command more than once to stay within argument-size limits, so the consumer must tolerate batches. The example hashes files without changing them; its human-readable output is still line-oriented and should not be parsed back into filenames.
The delimiter only protects the segment that uses it. A later while read, newline-separated manifest, or copied terminal output can reintroduce the same bug. Keep NUL records through every machine-readable path boundary, or pass paths directly with find -exec ... {} + when that fits the task. Neither method freezes the directory: a file can be replaced between discovery and processing, a race the find manual explicitly notes. For ingestion, validate the file again when opening it and decide how a vanished or changed input should be recorded. The practical rule is to choose a separator that filenames cannot contain, then make every consumer honor it.

The Campfire
No commentsNobody has pulled up a log by this one yet. Be the first to say what you make of it.
Held for the desk. It appears after a look.