Argument list too long错误 及/dev/null

简介:

1。   1>   /dev/null   表示将命令的标准输出重定向到              /dev/null   
          2>/dev/null   表示将命令的错误输出重定向到           /dev/null   
    
  2。&表示后台执行,你可以继续占有你的输入窗口

写法EG:

*/5 * * * * /usr/sbin/ntpdate time.windows.com > /dev/null 2&>1

  

删除文件时,报"-bash: /bin/rm: Argument list too long"错误.查了一下,
[root@srv1 mqueue]# ls -l |wc -l
 319913
应该是文件数量太大了吧,记得应该是shell的限制,rm mv cp都受此限制。
解决方法:find所有文件,然后送给rm删除.
find /var/spool/mqueue -type f -exec rm {} \;


本文转自 godoha 51CTO博客,原文链接:http://blog.51cto.com/godoha/80218 ,如需转载请自行联系原作者

相关文章
|
2月前
|
Unix Linux Shell
linux中nohup和/dev/null,21
linux中nohup和/dev/null,21
46 0
|
4月前
|
Linux Windows
Linux中/dev/null和/dev/zero的作用
Linux中/dev/null和/dev/zero的作用
47 2
|
9天前
|
缓存 资源调度 DataWorks
DataWorks操作报错合集之DataWorks节点报错:OSError: [Errno 7] Argument list too long,该怎么处理
DataWorks是阿里云提供的一站式大数据开发与治理平台,支持数据集成、数据开发、数据服务、数据质量管理、数据安全管理等全流程数据处理。在使用DataWorks过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
22 1
|
19天前
四种解决”Arg list too long”参数列表过长的办法
这些方法都可以帮助你避免因参数列表过长而导致的错误。选择方法取决于具体情况和需求。
12 0
|
2月前
|
安全 Unix Linux
探秘Linux特殊设备文件:(/dev/null,/dev/zero,/dev/random,/dev/urandom等)
探秘Linux特殊设备文件:(/dev/null,/dev/zero,/dev/random,/dev/urandom等)
120 1
|
2月前
|
Java
JAVA——List中剔除空元素(null)的三种方法汇总
JAVA——List中剔除空元素(null)的三种方法汇总
|
6月前
|
Java
IDEA-解决Command line is too long. Shorten command line for SpringBootMainApplication or also for App
IDEA-解决Command line is too long. Shorten command line for SpringBootMainApplication or also for App
61 0
|
5月前
|
SQL JSON Java
Java【问题记录 02】对象封装+固定排序+list All elements are null引起的异常处理+Missing artifact com.sun:tools:jar:1.8.0
Java【问题记录 02】对象封装+固定排序+list All elements are null引起的异常处理+Missing artifact com.sun:tools:jar:1.8.0
43 0
|
5月前
|
存储 Shell Linux
What is /dev/null and How to Use It
What is /dev/null and How to Use It
34 0
What is /dev/null and How to Use It
|
6月前
|
Java
IDEA-解决Command line is too long. Shorten command line for SpringBootMainApplication or also for App
IDEA-解决Command line is too long. Shorten command line for SpringBootMainApplication or also for App
43 0