I have a number of files in a folder on a Linux machine with the following names:
11, 12, 13, 14, 15, 21, 22, 23, 24, 25, 31, 32, 33, 34, 35
I would like to use regex in order to rename with the .inp extension
I tried
mv * *.inp
mv: target '*.inp' is not a directory
which provided an error. I also tried using the regex instead of the *.
So, I understand that mv is used to move files around. I also got the idea that perhaps I could use
./*.inp
to force mv to write in the same folder but it failed. So, apart from not understading correctly how mv
works, how would I proceed to have have this done with mv
?
Asked by Strelok
(123 rep)
Feb 1, 2022, 01:44 PM
Last activity: Dec 16, 2022, 12:24 PM
Last activity: Dec 16, 2022, 12:24 PM