| DETOX(1) | General Commands Manual | DETOX(1) |
detox — clean up
filenames
detox |
[-f configfile]
[-n | --dry-run]
[-r] [-s
sequence] [--special]
[-v] file ... |
detox |
[-L] [-f
configfile] [-v] |
detox |
[-h | --help] |
detox |
[-V] |
The detox utility renames files to make
them easier to work with under Unix and Unix-like operating systems. It
replaces characters that make it hard to type out a filename with dashes and
underscores. It also provides transliteration-based filters, converting ISO
8859-1 or UTF-8 to ASCII, in part or in whole. An additional filter
unescapes CGI-escaped filenames.
detox is driven by a configurable series
of filters, called a sequence. Sequences are covered in more detail in
detoxrc(5) and are discoverable with the
-L option. The default sequence will run the
safe and wipeup filters. Other
examples of pre-configured sequences are iso8859_1 and
utf_8, which both provide transliteration to ASCII and
then finish with the safe and
wipeup filters.
-f
configfile-h,
--help--inline-L-v this option shows what filters are used in each
sequence and any properties applied to the filters.-n,
--dry-run-v option.-r-s
sequencedefault.--specialdetox ignores these files.
detox will not recurse into symlinks that point at
directories.-v-Vdetox.-f has
been specified, in which case, it is ignored.detox -s
lower -r
-v -n
/tmp/new_filesdetox -f
my_detoxrc -L
-vinline-detox(1), Text::Unidecode(3pm), detox.tbl(5), detoxrc(5), ascii(7), iso_8859-1(7), unicode(7), utf-8(7)
detox was originally designed to clean up
files that I had received from friends which had been created using other
operating systems. It's trivial to create a filename with spaces,
parenthesis, brackets, and ampersands under some operating systems. These
have special meaning within FreeBSD and Linux, and
cause problems when you go to access them. I created
detox to clean up these files.
Version 2.0 stepped back from transliteration out of the box, instead focusing on ease of use. The primary motivations for this were user-provided feedback, and the fact that many modern Unix-like OSs use UTF-8 as their primary character set. Transliterating from UTF-8 to ASCII in this scenario is lossy and pointless.
detox was written by Doug
Harple.
If, after the translation of a filename is finished, a file
already exists with that same name, detox will not
rename the file.
| February 24, 2021 | Debian |