命令行:
perl -pi -e 's|[old_string]|[new_string]|g' [file]

find和xargs组合,递归的改变目录下所有文件的内容
find /etc -type f| xargs perl -pi -e 's|/var/spool/mail|/var/spool/messages|g'

相关文章:

  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2021-09-19
  • 2021-12-09
猜你喜欢
  • 2021-12-31
  • 2021-08-05
  • 2021-06-21
  • 2021-12-07
  • 2022-12-23
  • 2021-12-13
  • 2021-05-15
相关资源
相似解决方案