recursively add file extension to all files

前端 未结 6 1878
盖世英雄少女心
盖世英雄少女心 2020-12-07 07:52

I have a few directories and sub-directories containing files with no file extension. I want to add .jpg to all the files contained within these directories. I\

6条回答
  •  爱一瞬间的悲伤
    2020-12-07 08:27

    this will find files without extension and add your .jpg

    find /path -type f -not -name "*.*" -exec mv "{}" "{}".jpg \;
    

提交回复
热议问题