Sunday, August 11, 2019

bulk renaming from commandline on linux

Using the rename tool,
An example is
rename 's/\.html$/\.php/' *.html
From
we see that a normal string substitution would be like
s/dog/cat/

rename -n 's/SV_2019_08_10_PM_SOME_LONG_NAME/SV_2019_08_10_SHORTNAME/' SV*mp3
shows what it will do, and -v will actually do it and also display the result.

No comments:

Post a Comment