I'm used to browsing files with nnn, but I'm tired of relying on it whenever I need to rename something. What commands or tools do you usually use to rename a single file or rename multiple files on Linux?
4 Answers
If you want protection against accidentally overwriting an existing destination, use `mv -i old-name new-name`. It will ask for confirmation before replacing anything.
The giant Bash-script approach is technically entertaining, but it’s wildly unnecessary for a rename. Plain `mv` is the standard tool and is already included on essentially every Linux system.
For batch renaming, many Linux systems provide a `rename` command, which can apply a pattern or substitution across multiple filenames. The exact syntax can vary between implementations, so check `rename --help` or its manual page first.
For a single file, the usual command is simply `mv old-name new-name`. Despite the name, `mv` works for both moving and renaming files.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures