在Linux上删除文件时,执行命令报错,报错信息如下:
node1:/u01/app/oracle/admin/testdb/adump>rm -f *.aud
-bash:/bin/rm:Argument list too long

查看文件数量
node1:/u01/app/oracle/admin/testdb/adump>ll | wc -l
247841

解决方法:
使用分批删除
node1:/u01/app/oracle/admin/testdb/adump>ls|xargs -n 1000 rm -f

关于xargs的使用方法,见:https://www.runoob.com/linux/linux-comm-xargs.html

相关文章:

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