Linux: remove file extensions for multiple files

后端 未结 9 1926
甜味超标
甜味超标 2020-12-04 16:43

I have many files with .txt extension. How to remove .txt extension for multiple files in linux?

I found that

rename .old .new *.old
<
9条回答
  •  既然无缘
    2020-12-04 17:01

    I use this:

    find ./ -name "*.old" -exec sh -c 'mv $0 `basename "$0" .old`.new' '{}' \;
    

提交回复
热议问题