How to Use Linux Rename Command
- Chris Speed
- Oct 17, 2022
- 1 min read
Updated: Jun 19, 2023
Change the naming convention of Plex
File name - "heathcliff138.mp4"
rename -v 's/heathcliff1/heathcliffS01/' *.mp4
rename -v 's/heathcliffS01/heathcliffS01E/' *.mp4
New File name - "heathcliffS01E38.mp4"
Replacing a Part of a Filename
Replacing a different part of the filename follows the same syntax. To rename example1.txt, example2.txt, and example3.txt to test1.txt, test2.txt, and text3.txt, use:
rename -v 's/example/test/' *.txt
Reference:
"How to Rename Files in Linux.", https://phoenixnap.com/kb/rename-file-linux
Commentaires