I have 12 files named
dmp_001, etc, all the way to
dmp_011. I would like to copy all of them to
rdmp_001, and so on, sequentially so the numbered files coincide. There must be an easy way to do this rather than individually?
I used this command to generate some sample data
To duplicate the files and preserve the original files modify/create dates:
To move the files wdmp* to rdmp*
NOTE: You could also have used @warl0ck's answer for that using the
If the use of
Or simply in this case:
See this link for more examples.
Posix compatible, short, and all your files can be referenced ( within the parens ) as positional params 1-12 if you want to expand on it.
Try rename command, and only rename those started with
To keep the files, try an alternate method like this,