[英]How to remove this error from “DIR” results : “File name is too long” from printing in console
My question is simple , for both windows and linux : 我的问题很简单,对于Windows和Linux:
How to remove this error message from any search result "The directory/filename is too long" By remove I mean , do not print in console. 如何从任何搜索结果中删除此错误消息“目录/文件名太长”。通过删除,我的意思是不要在控制台中打印。
Example : dir /s/b *BlaBla.java 示例:dir / s / b * BlaBla.java
or ls -R | 或ls -R | grep *BlaBla.java
grep * BlaBla.java
Discard error text output ( stderr
) of command 舍弃命令的错误文本输出(
stderr
)
dir /s /b *BlaBla.java 2> NUL
ls -R 2> /dev/null | grep *BlaBla.java
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.