gpt4 book ai didi

windows - cmd.exe 查找具有完整路径的文件和目录?

转载 作者:可可西里 更新时间:2023-11-01 11:48:27 28 4
gpt4 key购买 nike

我刚刚注意到,在 Windows cmd.exe 中查找这样的文件:

C:\test>dir . /s | findstr /E "test.exe"
24-05-2016 18:11 262.656 test.exe
24-05-2016 18:11 262.656 test.exe

... 不提供文件的完整路径,因为它不在 dir 的输出中。在 Unix 中,我可以这样做:

find /c/test -name "test.exe"

...我会得到一个绝对路径列表。如何在 Windows 命令提示符 cmd.exe 中执行相同操作?

最佳答案

要打印完整路径,请使用 dir/b

dir /S /b "test.exe"

关于windows - cmd.exe 查找具有完整路径的文件和目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37419074/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com