1DETOX(1)                  BSD General Commands Manual                 DETOX(1)
2

NAME

4     detox — clean up filenames
5

SYNOPSIS

7     detox [-hnLrv] [-s -sequence] [-f -configfile] [--dry-run] [--special]
8           file ...
9

DESCRIPTION

11     The detox utility renames files to make them easier to work with.  It
12     removes spaces and other such annoyances.  It'll also translate or
13     cleanup Latin-1 (ISO 8859-1) characters encoded in 8-bit ASCII, Unicode
14     characters encoded in UTF-8, and CGI escaped characters.
15
16   Sequences
17     detox is driven by a configurable series of filters, called a sequence.
18     Sequences are covered in more detail in detoxrc(5) and are discoverable
19     with the -L option.  Some examples of default sequences are iso8859_1 and
20     utf_8.
21
22   Options
23     The main options:
24
25     -f configfile
26                 Use configfile instead of the default configuration files for
27                 loading translation sequences.  No other config file will be
28                 parsed.
29
30     -h --help   Display helpful information.
31
32     -L          List the currently available sequences.  When paired with -v
33                 this option shows what filters are used in each sequence and
34                 any properties applied to the filters.
35
36     -n --dry-run
37                 Doesn't actually change anything.  This implies the -v
38                 option.
39
40     -r          Recurse into subdirectories.
41
42     -s sequence
43                 Use sequence instead of default.
44
45     --special   Works on special files (including links).  Normally detox
46                 ignores these files.
47
48     -v          Be verbose about which files are being renamed.
49
50     -V          Show the current version of detox.
51
52   Deprecated Options
53     Deprecated Options are options that were available in earlier versions of
54     detox but have lost their meaning and are being phased out.
55
56     --remove-trailing
57                 Removes _ and - after .'s in filenames.  This was first pro‐
58                 vided in the 0.9 series of detox.  After the introduction of
59                 sequences, it lost its meaning, as you could now determine
60                 the properties of wipeup through a particular sequence's con‐
61                 figuration.  It presently forces all instances of the wipeup
62                 filter to use remove trailing, regardless of what's actually
63                 in the config files.
64

FILES

66     detoxrc        The system-wide detoxrc file.
67     ~/.detoxrc     A user's personal detoxrc.  Normally it extends the sys‐
68                    tem-wide detoxrc, unless -f has been specified, in which
69                    case, it is ignored.
70     iso8859_1.tbl  The default ISO 8859-1 translation table.
71     unicode.tbl    The default Unicode (UTF-8) translation table.
72

EXAMPLES

74     detox -s iso8859_1 -r -v -n /tmp/new_files
75                 Will run the sequence iso8859_1 recursively, listing any
76                 changes, without changing anything, on the files of
77                 /tmp/new_files.
78
79     detox -c my_detoxrc -L -v
80                 Will list the sequences within my_detoxrc, showing their fil‐
81                 ters and options.
82

SEE ALSO

84     inline-detox(1), detoxrc(5), detox.tbl(5).
85

HISTORY

87     detox was originally designed to clean up files that I had received from
88     friends which had been created using other operating systems.  It's triv‐
89     ial to create a filename with spaces, parenthesis, brackets, and amper‐
90     sands under some operating systems.  These have special meaning within
91     FreeBSD and Linux, and cause problems when you go to access them.  I cre‐
92     ated detox to clean up these files.
93

AUTHORS

95     detox was written by Doug Harple.
96

BUGS

98     If, after the translation of a filename is finished, a file already
99     exists with that same name, detox will not rename the file.  This could
100     cause a problem with the max_length filter, if it was imperative that the
101     files be cut down to a certain length.
102
103     Long options don't work under Solaris or Darwin.
104
105     An error in the config file will cause a segfault as it's going to print
106     the offending word within the config file.
107
108BSD                             August 3, 2004                             BSD
Impressum