How to change the names of the photovoltaic files
Bogopo last edited by
Good afternoon. I need to remove the souffix on behalf of the file and add the prefix to the start of the file. You need to change in a way. I tried to do this:
for f in $(find /folder/ . -name "*_file._small.mov*"); do mv $f $(echo $f | sed '/._small/s/._small//g'); done
but it doesn't work.
87349_file._small.movand turn into
A ready solution may look, for example:
find /folder/ -type f -name \*_file._small.mov\* | while read f; do d=$(dirname $f) n=$(basename $f) (cd $d; prename -n 's/\._small\.mov//;s/^/small_/' $n) done
Look at the parameter.
prename- He will not rename the files, but will only be given a report on possible actions (to rename this parameter should be removed).
87348_file._small.mov renamed as small_87348_file 87349_file._small.mov renamed as small_87349_file