执行命令:perl -p -i -e "s/sysread/read/g" test.txt 时,报错:can't do inplace edit without bakcup。

在网上搜索了一下,发现应该在 -i 后加一个扩展名,如 -i.old,此时就会生成 test.txt.old备份文件,而源文件被直接修改。

 

 

相关文章:

  • 2022-12-23
  • 2021-10-01
  • 2021-08-21
  • 2021-10-26
  • 2021-12-16
  • 2021-06-28
  • 2021-04-26
  • 2022-12-23
猜你喜欢
  • 2021-08-26
  • 2022-12-23
  • 2022-01-03
  • 2021-12-13
  • 2021-11-16
  • 2022-12-23
相关资源
相似解决方案