detox
clean up problematic filenames
TLDR
SYNOPSIS
detox [options] file-or-directory...
DESCRIPTION
detox cleans up filenames by replacing problematic characters with safe alternatives. It handles spaces, special characters, Unicode characters, and other elements that can cause issues in shell scripts or cross-platform file sharing.The tool applies configurable sequences of transformations including replacing spaces with underscores, removing or transliterating non-ASCII characters, and fixing case issues. Multiple built-in sequences handle different cleaning scenarios.detox is valuable for batch-processing files from Windows systems, music libraries with complex names, or any source with inconsistent naming conventions.
PARAMETERS
FILE
Files or directories to process.-r, --recurse
Process directories recursively.-n, --dry-run
Show what would be renamed without changes.-v, --verbose
Verbose output showing renames.-s SEQUENCE
Cleaning sequence to use (default runs the safe and wipeup filters).-L
List the currently available sequences.--special
Work on links and special files too.-f FILE
Use specified configuration file instead of the defaults.--help
Display help information.
CONFIGURATION
/etc/detoxrc or ~/.detoxrc
Configuration file defining cleaning sequences and filename filters.
INSTALL
CAVEATS
May create duplicate filenames requiring manual resolution. Irreversible without backups. Unicode transliteration may lose information. Some sequences are aggressive and may over-simplify names.
HISTORY
detox was written by Doug Harple to address the common problem of managing files with problematic names in Unix environments. It provides a systematic approach to filename sanitization.
