Skip to content

rnm: add page #16115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions pages/linux/rnm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# rnm

> Bulk Rename Utility.
> More information: <https://github.com/neurobin/rnm>.

- Replace a search string with a replacement string in filenames:

`rnm -ss {{old}} -rs {{new}} {{path/to/directory}}`

- Use a fixed (literal) search and replace string instead of regex:

`rnm -ssf {{old}} -rs {{new}} {{path/to/files}}`

- Add an auto-incremented index to filenames starting from 1:

`rnm -i 1 -inc 1 -rs {{_}} {{path/to/files}}`

- Rename files using a list of new names from a text file:

`rnm -ns/f {{path/to/names.txt}} {{path/to/files}}`

- Rename only files (ignoring directories and links):

`rnm -fo -ss {{pattern}} -rs {{replacement}} {{path/to/files}}`

- Sort input files by modification time before renaming:

`rnm -s/mt -ss {{pattern}} -rs {{replacement}} {{path/to/files}}`

- Run a simulation without making actual changes:

`rnm -sim -ss {{pattern}} -rs {{replacement}} {{path/to/files}}`

- Undo the last renaming operation:

`rnm -u`