4 fdupes-help \- fdupes interactive mode reference
9 .RB ( "" "as " "fdupes --delete" ),
11 will show a list of duplicates and prompt the user for further action.
13 The user can tell fdupes which files to keep or delete by tagging them accordingly. Once tagged, the user can instruct fdupes to delete any files that have been tagged for deletion. This can be done incrementally, if desired, successively tagging and deleting a limited number of files at a time until no more duplicates remain to be processed.
15 There are several ways to tag files in fdupes: individually using the
17 by providing a list of files to keep, or by selecting files that match particular search criteria and tagging those as desired. Each of these approaches is discussed in detail in the sections below.
19 .SH "SCROLLING THE LIST"
21 The list of duplicates can be scrolled as follows:
24 Scroll down to the next page.
28 Scroll up to preceding page.
32 Scroll down by one line. Not supported on some terminals.
36 Scroll up by one line. Not supported on some terminals.
38 .SH "MOVING THE CURSOR"
40 The cursor tells fdupes which file and/or set of duplicates to act on, as described in the next section. The cursor's position can be changed as follows:
44 Advance cursor to the next file on the list.
48 Move cursor back to the previous file.
52 Advance cursor to the next set of duplicates.
56 Move cursor back to the previous set.
60 Advance cursor to the next
66 Move cursor back to the previous
71 It is also possible to jump directly to a particular set:
75 Move cursor to the top of the set indicated by
78 .SH "TAGGING FILES USING THE CURSOR"
80 Individual files can be tagged using the keys below. These keys all act on the current file, as identified by the cursor.
84 Tag current file for keeping.
88 Tag current file for deletion.
92 Remove tag from current file.
95 Entire sets of files can be tagged by providing a list of indices in a comma-separated list. Files in the current set whose indices appear on the list will be tagged for keeping, while any other files in that set will be tagged for deletion. As with individual files, the current set is identified by the cursor.
98 As an example, given the following list of duplicates:
113 at the prompt and pressing ENTER will tell fdupes to tag
122 for deletion. The special command
125 will tag all files for keeping.
128 There is one more command to deal with files in the current set:
131 Remove tags from all files in current set.
133 .SH "FILE SELECTION COMMANDS"
135 Another way to tag files is to first select them according to particular search criteria and then tell fdupes what to do with them. The following commands can be used to select files for tagging:
139 Select any files whose paths contain the given text.
143 Select any files whose paths begin with the given text.
147 Select any files whose paths end with the given text.
151 Select any file whose path matches the given text exactly.
154 .IP "'selr <expression>'"
155 Select any files whose paths match the given
162 Deselect any files whose paths contain the given text.
166 Deselect any files whose paths begin with the given text.
170 Deselect any files whose paths end with the given text.
174 Deselect any file whose path matches the given text exactly.
177 .IP "'dselr <expression>'"
178 Deselect any files whose paths match the given
185 Clear all selections.
189 Invert selections within selected sets. For example, if files 1 and 4 in a set of 5 are selected,
192 will deselect files 1 and 4, and select files 2, 3, and 5. Immediately repeating the same command will deselect files 2, 3, and 5, and select files 1 and 4, restoring selections to their previous state.
194 .SH "TAGGING SELECTED FILES"
196 Once some files have been selected using the commands described above, the following commands can be used to tag selected files as desired:
199 Tag selected files for keeping.
203 Tag selected files for deletion.
207 Remove all tags from selected files.
209 .SH "DELETING DUPLICATES"
210 Once tagged for deletion, files can be deleted by pressing
215 command. Fdupes will delete any files that are tagged for deletion and delist any sets whose remaining files have been tagged for keeping. For safety, fdupes will refuse to act on sets for which all files have been tagged for deletion. To handle these cases, tag at least one file for keeping and run the delete command again.
224 Display this help text.
226 .SH "REGULAR EXPRESSIONS"
228 A regular expression is a sequence of characters defining a search pattern against which other character sequences can be compared. Strings of characters that follow the pattern defined by an expression are said to
231 the expression, whereas strings that break the pattern do not.
233 The syntax for regular expressions used by fdupes is known as the
235 Perl Compatible Regular Expression
236 syntax. A detailed description of regular expression syntax is beyond the scope of this document. For detailed information the user is encouraged to consult the
242 https://www.pcre.org/current/doc/html/pcre2syntax.html
246 Briefly, here are some examples of regular expressions:
250 Will match any string containing the sequence
261 Will match any string beginning with
264 .IR abc123 " and " abc123x ,
266 .IR xabc123 " or " xabc123x .
267 The character '^' has special meaning, telling the program to match only those strings that begin with the pattern that follows.
271 Will match any string that ends with
274 .IR abc123 " and " xabc123 ,
276 .IR abc123x " or " xabc123x .
277 The character '$' has special meaning, telling the program to match only those strings that end with the preceding pattern.
281 Will match the string
287 Will match any string containing
289 as in the first example, but it will also match strings containing
293 etc. The character '.' has special meaning, acting as a placeholder that will match any character in that position.
297 Will match any string beginning with the letter a and ending with the number 3, such as
302 Here the character '*' tells the program to accept any number of appearances (including none) for the preceding item (here, any character matching the placeholder character '.'). The characters '^' and '$' have the same meaning as in previous examples.
306 Will match any string containing the characters
308 followed immediately by one or more decimal digits, such as
309 .IR abc123 " and " abc3210 ,
314 (note the space). Here \ed is a placeholder for any decimal digit, while the character '+' tells the program to match one or more appearances of the preceding character or placeholder (here, \ed).
318 Will match any string containing one or more "word" characters followed immediately by one or more decimal digits, such as
319 .IR abc123 " and " abcd3210 ,
322 (note the space). Here \ew is a placeholder for a "word" character, and \ed and '+' have the same meaning as in the preceding example.
325 This is just scratching the surface of what can be done with regular expressions. Consult the PCRE2 documentation for a complete reference.