Skip to content

Commit 5f72f96

Browse files
testbughubManagorspageektti
authored
rnm: add page (#16115)
Co-authored-by: Managor <[email protected]> Co-authored-by: Wiktor Perskawiec <[email protected]>
1 parent af94db1 commit 5f72f96

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Diff for: pages/linux/rnm.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# rnm
2+
3+
> Bulk Rename Utility.
4+
> More information: <https://github.com/neurobin/rnm>.
5+
6+
- Replace a search string with a replacement string in filenames:
7+
8+
`rnm -ss {{old}} -rs {{new}} {{path/to/directory}}`
9+
10+
- Use a fixed (literal) search and replace string instead of regex:
11+
12+
`rnm -ssf {{old}} -rs {{new}} {{path/to/files}}`
13+
14+
- Add an auto-incremented index to filenames starting from 1:
15+
16+
`rnm -i 1 -inc 1 -rs {{_}} {{path/to/files}}`
17+
18+
- Rename files using a list of new names from a text file:
19+
20+
`rnm -ns/f {{path/to/names.txt}} {{path/to/files}}`
21+
22+
- Rename only files (ignoring directories and links):
23+
24+
`rnm -fo -ss {{pattern}} -rs {{replacement}} {{path/to/files}}`
25+
26+
- Sort input files by modification time before renaming:
27+
28+
`rnm -s/mt -ss {{pattern}} -rs {{replacement}} {{path/to/files}}`
29+
30+
- Run a simulation without making actual changes:
31+
32+
`rnm -sim -ss {{pattern}} -rs {{replacement}} {{path/to/files}}`
33+
34+
- Undo the last renaming operation:
35+
36+
`rnm -u`

0 commit comments

Comments
 (0)