Linux: remove file extensions for multiple files

后端 未结 9 1919
甜味超标
甜味超标 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:13

    You can explicitly pass in an empty string as an argument.

    rename .old '' *.old

    And with subfolders, find . -type d -exec rename .old '' {}/*.old \;. {} is the substitute for the entry found with find, and \; terminates the arglist for the command given after -exec.

提交回复
热议问题