簡體   English   中英

如何從“ DIR”結果中消除此錯誤:從控制台中打印“文件名太長”

[英]How to remove this error from “DIR” results : “File name is too long” from printing in console

我的問題很簡單,對於Windows和Linux:

如何從任何搜索結果中刪除此錯誤消息“目錄/文件名太長”。通過刪除,我的意思是不要在控制台中打印。

示例:dir / s / b * BlaBla.java

或ls -R | grep * BlaBla.java

舍棄命令的錯誤文本輸出( stderr

cmd重定向

dir /s /b *BlaBla.java 2> NUL

bash重定向:

ls -R 2> /dev/null | grep *BlaBla.java

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM