How to do a mass rename?

前端 未结 11 2047
被撕碎了的回忆
被撕碎了的回忆 2020-11-27 06:23

I need to rename files names like this

transform.php?dappName=Test&transformer=YAML&v_id=XXXXX

to just this

XXXXX.t         


        
11条回答
  •  旧巷少年郎
    2020-11-27 06:36

    This should also work:

    prfx='transform.php?dappName=Test&transformer=YAML&v_id='

    ls $prfx* | sed s/$prfx// | xargs -Ipsx mv "$prfx"psx psx

提交回复
热议问题