如何%002E
用点( .
) 替换所有目录和子目录名称。
我尝试了以下命令,但它不起作用
find . | rename -v "s/%002E/./g"
当我在单个文件上运行时出现此错误
Can't rename ./doc%002Ejson ./doc.json: Invalid cross-device link
Can't rename ./doc%002Ejson/fileData ./doc.json/fileData: No such file or directory
Can't rename ./doc%002Ejson/metadata ./doc.json/metadata: No such file or directory
Can't rename ./fontDef%002Ejson ./fontDef.json: Invalid cross-device link
Can't rename ./fontDef%002Ejson/fileData ./fontDef.json/fileData: No such file or directory
Can't rename ./fontDef%002Ejson/metadata ./fontDef.json/metadata: No such file or directory
编辑:find -depth -type d | rename -n "s/%002E/./g"
也累了
我只看到
rename(./doc%002Ejson, ./doc.json)
rename(./fontDef%002Ejson, ./fontDef.json)
rename(./listDef%002Ejson, ./listDef.json)
rename(./styleDef%002Ejson, ./styleDef.json)
但当我这样做时,我仍然看到
doc%002Ejson
而不是doc.json