[英]How to recursively remove file extension from file?
所以我只是运行了以下命令来为一堆文件添加文件扩展名。 本来想一个个撤消,结果发现需要一次全部撤消,请问如何反推呢?
find . -name '*.targetFileType' -type f -exec mv '{}' '{}'.not \;
我需要将它返回到 aFile.targetFileType
我已经设法扭转:
for f in $(find. -name '*.not' -type f); do mv ${f} $(echo ${f} | sed 's/.not//g'); done;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.